Skip to content

Commit eaa1dd1

Browse files
committed
Use PG_TEST_TIMEOUT_DEFAULT in 019_replslot_limit.pl.
Oversight in f2698ea, 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.
1 parent 61b313e commit eaa1dd1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/test/recovery/t/019_replslot_limit.pl

+4-5
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
'ALTER SYSTEM RESET max_wal_size; SELECT pg_reload_conf()');
183183
$node_primary->safe_psql('postgres', "CHECKPOINT;");
184184
my $invalidated = 0;
185-
for (my $i = 0; $i < 10000; $i++)
185+
for (my $i = 0; $i < 10 * $PostgreSQL::Test::Utils::timeout_default; $i++)
186186
{
187187
if (find_in_log(
188188
$node_primary, 'invalidating obsolete replication slot "rep1"',
@@ -205,7 +205,7 @@
205205

206206
# Wait until current checkpoint ends
207207
my $checkpoint_ended = 0;
208-
for (my $i = 0; $i < 10000; $i++)
208+
for (my $i = 0; $i < 10 * $PostgreSQL::Test::Utils::timeout_default; $i++)
209209
{
210210
if (find_in_log($node_primary, "checkpoint complete: ", $logstart))
211211
{
@@ -235,7 +235,7 @@
235235
$node_standby->start;
236236

237237
my $failed = 0;
238-
for (my $i = 0; $i < 10000; $i++)
238+
for (my $i = 0; $i < 10 * $PostgreSQL::Test::Utils::timeout_default; $i++)
239239
{
240240
if (find_in_log(
241241
$node_standby,
@@ -353,8 +353,7 @@
353353
stderr => \$stderr);
354354
diag $stdout, $stderr;
355355

356-
# unlikely that the problem would resolve after 15s, so give up at point
357-
if ($i++ == 150)
356+
if ($i++ == 10 * $PostgreSQL::Test::Utils::timeout_default)
358357
{
359358
# An immediate shutdown may hide evidence of a locking bug. If
360359
# retrying didn't resolve the issue, shut down in fast mode.

0 commit comments

Comments
 (0)