postgres.git / summary / log / commit / refs
commit aa988457848fc153bfc85b4d240c0a020f9cdfe8
Author: Peter Eisentraut <peter@eisentraut.org>
Date: Sat Nov 09 12:19:27 2019 +0000
First released in: 13.0, 10.11, 11.6, 12.1
Fix subscription test
After altering a subscription, we should wait until the updated table
sync data has been fetched by the subscriber.
src/test/subscription/t/008_diff_schema.pl | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/test/subscription/t/008_diff_schema.pl b/src/test/subscription/t/008_diff_schema.pl
index 4f0851718ca..3854934f79d 100644
--- a/src/test/subscription/t/008_diff_schema.pl
+++ b/src/test/subscription/t/008_diff_schema.pl
@@ -105,6 +105,9 @@ $node_subscriber->safe_psql('postgres',
$node_subscriber->safe_psql('postgres',
"ALTER SUBSCRIPTION tap_sub REFRESH PUBLICATION");
+$node_subscriber->poll_query_until('postgres', $synced_query)
+ or die "Timed out while waiting for subscriber to synchronize data";
+
# Add replica identity column. (The serial is not necessary, but it's
# a convenient way to get a default on the new column so that rows
# from the publisher that don't have the column yet can be inserted.)
[parent: f77be47d3398]