aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2019-11-09 13:19:27 +0100
committerPeter Eisentraut <peter@eisentraut.org>2019-11-09 16:03:00 +0100
commit806f9dc02aea2e45a522bf3c7ed68154f6970e15 (patch)
treef8c16d24c6a9533696bd419bd9fe5c5e779de96d
parent2e00d5976419ff8db38ea1e1a0bc65dbd504fcfa (diff)
downloadpostgresql-806f9dc02aea2e45a522bf3c7ed68154f6970e15.tar.gz
postgresql-806f9dc02aea2e45a522bf3c7ed68154f6970e15.zip
Fix subscription test
After altering a subscription, we should wait until the updated table sync data has been fetched by the subscriber.
-rw-r--r--src/test/subscription/t/008_diff_schema.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/subscription/t/008_diff_schema.pl b/src/test/subscription/t/008_diff_schema.pl
index 2c94d4dfe43..580c56743f9 100644
--- a/src/test/subscription/t/008_diff_schema.pl
+++ b/src/test/subscription/t/008_diff_schema.pl
@@ -102,6 +102,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.)