Skip to content

Commit cb833c1

Browse files
committed
Handle timeout in PostgreSQL::Test::Cluster::is_alive()
This commit adds an extra --timeout=PG_TEST_TIMEOUT_DEFAULT to the call of pg_isready done in is_alive(), so as it is possible to have more leverage with the call on machines constrained on resources. By default the timeout is 180s, and it can be changed depending on the environment where the tests are run. Per buildfarm member mamba, where the default timeout of 3s used by pg_isready has proved that it may not be enough as the postmaster may not have the time it needs to reply to a ping request. Reported-by: Alexander Lakhin <exclusion@gmail.com> Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com> Discussion: https://postgr.es/m/29b637df-f818-4b52-986a-f11ba28300e9@gmail.com
1 parent c2c2c7e commit cb833c1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/test/perl/PostgreSQL/Test/Cluster.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ sub is_alive
304304

305305
my $ret = PostgreSQL::Test::Utils::system_log(
306306
'pg_isready',
307+
'--timeout' => $PostgreSQL::Test::Utils::timeout_default,
307308
'--host' => $self->host,
308309
'--port' => $self->port);
309310

0 commit comments

Comments
 (0)