@@ -33,7 +33,8 @@ PostgresNode - class representing PostgreSQL server instance
3333 my ($stdout, $stderr, $timed_out);
3434 my $cmdret = $node->psql('postgres', 'SELECT pg_sleep(600)',
3535 stdout => \$stdout, stderr => \$stderr,
36- timeout => 180, timed_out => \$timed_out,
36+ timeout => $TestLib::timeout_default,
37+ timed_out => \$timed_out,
3738 extra_params => ['--single-transaction'],
3839 on_error_die => 1)
3940 print "Sleep timed out" if $timed_out;
@@ -1650,7 +1651,8 @@ e.g.
16501651my ($stdout, $stderr, $timed_out);
16511652my $cmdret = $node->psql('postgres', 'SELECT pg_sleep(600)',
16521653stdout => \$stdout, stderr => \$stderr,
1653- timeout => 180, timed_out => \$timed_out,
1654+ timeout => $TestLib::timeout_default,
1655+ timed_out => \$timed_out,
16541656extra_params => ['--single-transaction'])
16551657
16561658will set $cmdret to undef and $timed_out to a true value.
@@ -1824,7 +1826,8 @@ scalar reference. This allows the caller to act on other parts of the system
18241826while idling this backend.
18251827
18261828The specified timer object is attached to the harness, as well. It's caller's
1827- responsibility to select the timeout length, and to restart the timer after
1829+ responsibility to set the timeout length (usually
1830+ $TestLib::timeout_default), and to restart the timer after
18281831each command if the timeout is per-command.
18291832
18301833psql is invoked in tuples-only unaligned mode with reading ofB<.psqlrc >
@@ -1912,9 +1915,10 @@ The process's stdin is sourced from the $stdin scalar reference,
19121915and its stdout and stderr go to the $stdout scalar reference.
19131916ptys are used so that psql thinks it's being called interactively.
19141917
1915- The specified timer object is attached to the harness, as well.
1916- It's caller's responsibility to select the timeout length, and to
1917- restart the timer after each command if the timeout is per-command.
1918+ The specified timer object is attached to the harness, as well. It's caller's
1919+ responsibility to set the timeout length (usually
1920+ $TestLib::timeout_default), and to restart the timer after
1921+ each command if the timeout is per-command.
19181922
19191923psql is invoked in tuples-only unaligned mode with reading ofB<.psqlrc >
19201924disabled. That may be overridden by passing extra psql parameters.
@@ -2227,7 +2231,7 @@ sub connect_fails
22272231RunB<$query > repeatedly, until it returns theB<$expected > result
22282232('t', or SQL boolean true, by default).
22292233Continues polling ifB<psql > returns an error result.
2230- Times out after180 seconds.
2234+ Times out after$TestLib::timeout_default seconds.
22312235Returns 1 if successful, 0 if timed out.
22322236
22332237=cut
@@ -2245,7 +2249,7 @@ sub poll_query_until
22452249' -d' ,$self -> connstr($dbname )
22462250];
22472251my ($stdout ,$stderr );
2248- my $max_attempts =180 *10 ;
2252+ my $max_attempts =10 *$TestLib::timeout_default ;
22492253my $attempts = 0;
22502254
22512255while ($attempts <$max_attempts )
@@ -2267,8 +2271,8 @@ sub poll_query_until
22672271$attempts ++;
22682272}
22692273
2270- # The query result didn't change in 180 seconds. Give up. Print the
2271- # output from the last attempt, hopefully that's useful for debugging.
2274+ # Give up. Print the output from the last attempt, hopefully that's useful
2275+ # for debugging.
22722276diagqq( poll_query_until timed out executing this query:
22732277$query
22742278expecting this output: