]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix subscription test
authorPeter Eisentraut <peter@eisentraut.org>
Sat, 9 Nov 2019 12:19:27 +0000 (13:19 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Sat, 9 Nov 2019 15:03:00 +0000 (16:03 +0100)
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

index 2c94d4dfe4324851e4946b9a6128d770ec83a82a..580c56743f9155c402c31e1566039cb31559f420 100644 (file)
@@ -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.)