diff options
author | Noah Misch <noah@leadboat.com> | 2023-04-02 09:31:09 -0700 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2023-04-02 09:31:09 -0700 |
commit | eaa1dd131ca0a4c8e221cd60cdfc69aa0f7efe42 (patch) | |
tree | 47c2f328ea4fec50c3facb683cb0194b9387aea9 /src | |
parent | 61b313e47eb987682441c675724c22bf4363c9c4 (diff) | |
download | postgresql-eaa1dd131ca0a4c8e221cd60cdfc69aa0f7efe42.tar.gz postgresql-eaa1dd131ca0a4c8e221cd60cdfc69aa0f7efe42.zip |
Use PG_TEST_TIMEOUT_DEFAULT in 019_replslot_limit.pl.
Oversight in f2698ea02ca8a56f38935d2b300ac54936712558, which introduced
the variable. This lowers some 1000s timeouts to the configurable
default of 180s, due to a lack of evidence for needing the longer
timeout. The alternative was 6*PG_TEST_TIMEOUT_DEFAULT, which we can
adopt if the need arises. Given the lack of observed trouble with these
timeouts, no back-patch.
Diffstat (limited to 'src')
-rw-r--r-- | src/test/recovery/t/019_replslot_limit.pl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/test/recovery/t/019_replslot_limit.pl b/src/test/recovery/t/019_replslot_limit.pl index 23f67093f63..cb047bf77d9 100644 --- a/src/test/recovery/t/019_replslot_limit.pl +++ b/src/test/recovery/t/019_replslot_limit.pl @@ -182,7 +182,7 @@ $node_primary->safe_psql('postgres', 'ALTER SYSTEM RESET max_wal_size; SELECT pg_reload_conf()'); $node_primary->safe_psql('postgres', "CHECKPOINT;"); my $invalidated = 0; -for (my $i = 0; $i < 10000; $i++) +for (my $i = 0; $i < 10 * $PostgreSQL::Test::Utils::timeout_default; $i++) { if (find_in_log( $node_primary, 'invalidating obsolete replication slot "rep1"', @@ -205,7 +205,7 @@ is($result, "rep1|f|t|lost|", # Wait until current checkpoint ends my $checkpoint_ended = 0; -for (my $i = 0; $i < 10000; $i++) +for (my $i = 0; $i < 10 * $PostgreSQL::Test::Utils::timeout_default; $i++) { if (find_in_log($node_primary, "checkpoint complete: ", $logstart)) { @@ -235,7 +235,7 @@ $logstart = get_log_size($node_standby); $node_standby->start; my $failed = 0; -for (my $i = 0; $i < 10000; $i++) +for (my $i = 0; $i < 10 * $PostgreSQL::Test::Utils::timeout_default; $i++) { if (find_in_log( $node_standby, @@ -353,8 +353,7 @@ while (1) stderr => \$stderr); diag $stdout, $stderr; - # unlikely that the problem would resolve after 15s, so give up at point - if ($i++ == 150) + if ($i++ == 10 * $PostgreSQL::Test::Utils::timeout_default) { # An immediate shutdown may hide evidence of a locking bug. If # retrying didn't resolve the issue, shut down in fast mode. |