Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit266b567

Browse files
author
Amit Kapila
committed
Fix the tests added by commitac4645c.
In the tests, after disabling the subscription, we were not waiting forthe replication connection to drop from the publisher. So when the testwas trying to use the same slot to fetch the messages via SQL API, itsometimes gives an error that the replication slot is active for otherPID.Per buildfarm.
1 parent9bc9b46 commit266b567

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎src/test/subscription/t/020_messages.pl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
# Ensure a transactional logical decoding message shows up on the slot
3535
$node_subscriber->safe_psql('postgres',"ALTER SUBSCRIPTION tap_sub DISABLE");
3636

37+
# wait for the replication connection to drop from the publisher
38+
$node_publisher->poll_query_until('postgres',
39+
'SELECT COUNT(*) FROM pg_catalog.pg_stat_replication', 0);
40+
3741
$node_publisher->safe_psql('postgres',
3842
"SELECT pg_logical_emit_message(true, 'pgoutput', 'a transactional message')"
3943
);
@@ -85,6 +89,10 @@
8589
# ensure a non-transactional logical decoding message shows up on the slot
8690
$node_subscriber->safe_psql('postgres',"ALTER SUBSCRIPTION tap_sub DISABLE");
8791

92+
# wait for the replication connection to drop from the publisher
93+
$node_publisher->poll_query_until('postgres',
94+
'SELECT COUNT(*) FROM pg_catalog.pg_stat_replication', 0);
95+
8896
$node_publisher->safe_psql('postgres',"INSERT INTO tab_test VALUES (1)");
8997

9098
my$message_lsn =$node_publisher->safe_psql('postgres',

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp