Skip to content

Commit 6551a05

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 88f0fda commit 6551a05

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
if ($ENV{enable_injection_points} ne 'yes')
@@ -623,7 +624,7 @@ sub wait_until_vacuum_can_remove
623624
/ERROR: cannot copy invalidated replication slot "vacuum_full_inactiveslot"/,
624625
"invalidated slot cannot be copied");
625626

626-
# Turn hot_standby_feedback back on
627+
# Set hot_standby_feedback to on
627628
change_hot_standby_feedback_and_wait_for_xmins(1, 1);
628629

629630
##################################################
@@ -754,12 +755,12 @@ sub wait_until_vacuum_can_remove
754755

755756
# message should not be issued
756757
ok( !$node_standby->log_contains(
757-
"invalidating obsolete slot \"no_conflict_inactiveslot\"", $logstart),
758+
"invalidating obsolete replication slot \"no_conflict_inactiveslot\"", $logstart),
758759
'inactiveslot slot invalidation is not logged with vacuum on conflict_test'
759760
);
760761

761762
ok( !$node_standby->log_contains(
762-
"invalidating obsolete slot \"no_conflict_activeslot\"", $logstart),
763+
"invalidating obsolete replication slot \"no_conflict_activeslot\"", $logstart),
763764
'activeslot slot invalidation is not logged with vacuum on conflict_test'
764765
);
765766

0 commit comments

Comments
 (0)