tests: Don't fail due to high default timeout in postmaster/003_start_stop
authorAndres Freund <[email protected]>
Fri, 7 Mar 2025 18:09:16 +0000 (13:09 -0500)
committerAndres Freund <[email protected]>
Fri, 7 Mar 2025 18:09:16 +0000 (13:09 -0500)
Some BF animals use very high timeouts due to their slowness. Unfortunately
postmaster/003_start_stop fails if a high timeout is configured, due to
authentication_timeout having a fairly low max.

As this test is reasonably fast, the easiest fix seems to be to cap the
timeout to 600.

Per buildfarm animal skink.

Reviewed-by: Heikki Linnakangas <[email protected]>
Discussion: https://postgr.es/m/ggflhkciwdyotpoie323chu2c2idpjk5qimrn462encwx2io7s@thmcxl7i6dpw

src/test/postmaster/t/003_start_stop.pl

index 036b296f72b80d9e4d55f843911b7e40e3ceaeca..4dc394139d959ae5d93e5e90d801576d1ea3ab92 100644 (file)
@@ -20,6 +20,10 @@ use Test::More;
 # "pg_ctl stop" will error out before the authentication timeout kicks
 # in and cleans up the dead-end backends.
 my $authentication_timeout = $PostgreSQL::Test::Utils::timeout_default;
+
+# Don't fail due to hitting the max value allowed for authentication_timeout.
+$authentication_timeout = 600 unless $authentication_timeout < 600;
+
 my $stop_timeout = $authentication_timeout / 2;
 
 # Initialize the server with low connection limits, to test dead-end backends