Skip to content

Commit c096dbe

Browse files
melanieplagemanhopebo
authored andcommitted
Minor test fixes in 035_standby_logical_decoding.pl
Import usleep, which, due to an oversight in oversight in commit 48796a98d5ae 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 <[email protected]> Author: Bertrand Drouvot <[email protected]> Reviewed-by: Masahiko Sawada <[email protected]> Discussion: https://postgr.es/m/flat/CAAKRu_YO2mEm%3DZWZKPjTMU%3DgW5Y83_KMi_1cr51JwavH0ctd7w%40mail.gmail.com Backpatch-through: 16 (cherry picked from commit 74dffe5c14ac0c2e1d993968e7baa7d0cb965e8c)
1 parent fa142b9 commit c096dbe

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,
@@ -582,7 +583,7 @@ sub wait_until_vacuum_can_remove
582583
/ERROR: cannot copy invalidated replication slot "vacuum_full_inactiveslot"/,
583584
"invalidated slot cannot be copied");
584585

585-
# Turn hot_standby_feedback back on
586+
# Set hot_standby_feedback to on
586587
change_hot_standby_feedback_and_wait_for_xmins(1, 1);
587588

588589
##################################################
@@ -724,12 +725,12 @@ sub wait_until_vacuum_can_remove
724725

725726
# message should not be issued
726727
ok( !$node_standby->log_contains(
727-
"invalidating obsolete slot \"no_conflict_inactiveslot\"", $logstart),
728+
"invalidating obsolete replication slot \"no_conflict_inactiveslot\"", $logstart),
728729
'inactiveslot slot invalidation is not logged with vacuum on conflict_test'
729730
);
730731

731732
ok( !$node_standby->log_contains(
732-
"invalidating obsolete slot \"no_conflict_activeslot\"", $logstart),
733+
"invalidating obsolete replication slot \"no_conflict_activeslot\"", $logstart),
733734
'activeslot slot invalidation is not logged with vacuum on conflict_test'
734735
);
735736

0 commit comments

Comments
 (0)