Skip to content

Commit 3c2c3f2

Browse files
Minor test fixes in 035_standby_logical_decoding.pl
Import usleep, which, due to an oversight in oversight in commit 48796a9 was used but not imported. Correct the comparison string used in two logfile checks. Previously, it was incorrect and thus the test could never have failed. Also wordsmith a comment to make it clear when hot_standby_feedback is meant to be on during the test scenarios. Reported-by: Melanie Plageman <melanieplageman@gmail.com> Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/flat/CAAKRu_YO2mEm%3DZWZKPjTMU%3DgW5Y83_KMi_1cr51JwavH0ctd7w%40mail.gmail.com Backpatch-through: 16
1 parent 112945a commit 3c2c3f2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/test/recovery/t/035_standby_logical_decoding.pl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
use PostgreSQL::Test::Cluster;
1010
use PostgreSQL::Test::Utils;
11+
use Time::HiRes qw(usleep);
1112
use Test::More;
1213

1314
my ($stdin, $stdout, $stderr,
@@ -577,7 +578,7 @@ sub wait_until_vacuum_can_remove
577578
/ERROR: cannot copy invalidated replication slot "vacuum_full_inactiveslot"/,
578579
"invalidated slot cannot be copied");
579580

580-
# Turn hot_standby_feedback back on
581+
# Set hot_standby_feedback to on
581582
change_hot_standby_feedback_and_wait_for_xmins(1, 1);
582583

583584
##################################################
@@ -720,12 +721,12 @@ sub wait_until_vacuum_can_remove
720721

721722
# message should not be issued
722723
ok( !$node_standby->log_contains(
723-
"invalidating obsolete slot \"no_conflict_inactiveslot\"", $logstart),
724+
"invalidating obsolete replication slot \"no_conflict_inactiveslot\"", $logstart),
724725
'inactiveslot slot invalidation is not logged with vacuum on conflict_test'
725726
);
726727

727728
ok( !$node_standby->log_contains(
728-
"invalidating obsolete slot \"no_conflict_activeslot\"", $logstart),
729+
"invalidating obsolete replication slot \"no_conflict_activeslot\"", $logstart),
729730
'activeslot slot invalidation is not logged with vacuum on conflict_test'
730731
);
731732

0 commit comments

Comments
 (0)