[svn:DBD-Pg] r11401 - DBD-Pg/trunk/t

[email protected]
Newsgroups perl.dbd.pg.changes
Message-ID <[email protected]>
Author: turnstep
Date: Tue Jun 10 16:12:18 2008
New Revision: 11401

Modified:
   DBD-Pg/trunk/t/dbdpg_test_setup.pl

Log:
Store initdb setting, raise max_connections to 4 to make sure its above superuser_reserved_connections


Modified: DBD-Pg/trunk/t/dbdpg_test_setup.pl
==============================================================================
--- DBD-Pg/trunk/t/dbdpg_test_setup.pl	(original)
+++ DBD-Pg/trunk/t/dbdpg_test_setup.pl	Tue Jun 10 16:12:18 2008
@@ -66,6 +66,9 @@
 	## First, check to see if we've been here before and left directions
 	my ($testdsn,$testuser,$helpconnect,$su,$testdir,$pg_ctl) = get_test_settings();
 
+	## For debugging purposes, we'll be storing this in README.testdatabase as well
+	my $initdb = 'default';
+
 	## Did we fail last time? Fail this time too, but quicker!
 	if ($testdsn =~ /FAIL!/) {
 		return $helpconnect, 'Previous failure', undef;
@@ -202,7 +205,7 @@
 		$helpconnect = 16;
 
 		## Use the initdb found by App::Info
-		my $initdb = $ENV{PGINITDB} || '';
+		$initdb = $ENV{PGINITDB} || '';
 		if (!$initdb or ! -e $initdb) {
 			$initdb = 'initdb';
 		}
@@ -336,7 +339,7 @@
 			$@ = qq{Could not open "$conf": $!};
 			last GETHANDLE;
 		}
-		print $cfh "\n\n## DBD::Pg testing parameters\nport=$testport\nmax_connections=3\n";
+		print $cfh "\n\n## DBD::Pg testing parameters\nport=$testport\nmax_connections=4\n";
 		print $cfh "listen_addresses='localhost'\n" if $^O =~ /Win32/;
 		print $cfh "\n";
 		close $cfh or die qq{Could not close "$conf": $!\n};
@@ -352,7 +355,7 @@
 				if (! -e "$test_database_dir/data/socket") {
 					mkdir "$test_database_dir/data/socket";
 				}
-				$option = "-o '-k socket'";
+				$option = q{-o '-k socket'};
 			}
 			my $COM = qq{$pg_ctl $option -l $test_database_dir/dbdpg_test.logfile -D $test_database_dir/data start};
 			if ($su) {
@@ -404,6 +407,7 @@
 		print $fh "## Feel free to remove it!\n";
 		print $fh "## Helpconnect: $helpconnect\n";
 		print $fh "## pg_ctl: $pg_ctl\n";
+		print $fh "## initdb: $initdb\n";
 		if ($@) {
 			print $fh "## DSN: FAIL!\n";
 			print $fh "## ERROR: $@\n";
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.