diff options
Diffstat (limited to 'src/test/subscription/t/024_add_drop_pub.pl')
-rw-r--r-- | src/test/subscription/t/024_add_drop_pub.pl | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/test/subscription/t/024_add_drop_pub.pl b/src/test/subscription/t/024_add_drop_pub.pl index 246f8c92372..eaf47e66f1a 100644 --- a/src/test/subscription/t/024_add_drop_pub.pl +++ b/src/test/subscription/t/024_add_drop_pub.pl @@ -37,13 +37,7 @@ $node_subscriber->safe_psql('postgres', ); # Wait for initial table sync to finish -my $synced_query = - "SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; - -$node_subscriber->poll_query_until('postgres', $synced_query) - or die "Timed out while waiting for subscriber to synchronize data"; - -$node_publisher->wait_for_catchup('tap_sub'); +$node_subscriber->wait_for_subscription_sync($node_publisher, 'tap_sub'); # Check the initial data of tab_1 is copied to subscriber my $result = $node_subscriber->safe_psql('postgres', @@ -67,10 +61,7 @@ $node_subscriber->safe_psql('postgres', "ALTER SUBSCRIPTION tap_sub DROP PUBLICATION tap_pub_1"); # Wait for initial table sync to finish -$node_subscriber->poll_query_until('postgres', $synced_query) - or die "Timed out while waiting for subscriber to synchronize data"; - -$node_publisher->wait_for_catchup('tap_sub'); +$node_subscriber->wait_for_subscription_sync($node_publisher, 'tap_sub'); # Check the initial data of tab_drop_refresh was copied to subscriber $result = $node_subscriber->safe_psql('postgres', @@ -82,10 +73,7 @@ $node_subscriber->safe_psql('postgres', "ALTER SUBSCRIPTION tap_sub ADD PUBLICATION tap_pub_1"); # Wait for initial table sync to finish -$node_subscriber->poll_query_until('postgres', $synced_query) - or die "Timed out while waiting for subscriber to synchronize data"; - -$node_publisher->wait_for_catchup('tap_sub'); +$node_subscriber->wait_for_subscription_sync($node_publisher, 'tap_sub'); # Check the initial data of tab_1 was copied to subscriber again $result = $node_subscriber->safe_psql('postgres', |