mirror of
https://github.com/postgres/postgres.git
synced 2026-03-12 05:32:27 -04:00
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
20 lines
432 B
Perl
20 lines
432 B
Perl
use strict;
|
|
use warnings;
|
|
|
|
use PostgresNode;
|
|
use TestLib;
|
|
use Test::More tests => 10;
|
|
|
|
program_help_ok('pg_isready');
|
|
program_version_ok('pg_isready');
|
|
program_options_handling_ok('pg_isready');
|
|
|
|
command_fails(['pg_isready'], 'fails with no server running');
|
|
|
|
my $node = get_new_node('main');
|
|
$node->init;
|
|
$node->start;
|
|
|
|
$node->command_ok(
|
|
[ 'pg_isready', "--timeout=$TestLib::timeout_default" ],
|
|
'succeeds with server running');
|