1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Introduce PG_TEST_TIMEOUT_DEFAULT for TAP suite non-elapsing timeouts.

Slow hosts may avoid load-induced, spurious failures by setting
environment variable PG_TEST_TIMEOUT_DEFAULT to some number of seconds
greater than 180.  Developers may see faster failures by setting that
environment variable to some lesser number of seconds.  In tests, write
$PostgreSQL::Test::Utils::timeout_default wherever the convention has
been to write 180.  This change raises the default for some briefer
timeouts.  Back-patch to v10 (all supported versions).

Discussion: https://postgr.es/m/20220218052842.GA3627003@rfd.leadboat.com
This commit is contained in:
Noah Misch
2022-03-04 18:53:13 -08:00
parent 4b0696b36e
commit 8700a48735
11 changed files with 42 additions and 30 deletions

View File

@ -15,6 +15,6 @@ my $node = get_new_node('main');
$node->init;
$node->start;
# use a long timeout for the benefit of very slow buildfarm machines
$node->command_ok([qw(pg_isready --timeout=60)],
$node->command_ok(
[ 'pg_isready', "--timeout=$TestLib::timeout_default" ],
'succeeds with server running');