File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 141
141
142
142
# We cannot rely solely on wait_for_catchup() here; it isn't sufficient
143
143
# when tablesync workers might still be running. So in addition to that,
144
- # we verify that no tablesync workers appear for the subscription .
144
+ # verify that tables are synced .
145
145
# XXX maybe this should be integrated in wait_for_catchup() itself.
146
146
$node_twoways -> wait_for_catchup(' testsub' );
147
- $node_twoways -> poll_query_until(
148
- ' d2 ' ,
149
- " SELECT count(*) FROM pg_stat_subscription WHERE subname = 'testsub' AND relid <> 0 " ,
150
- " 0 " ) ;
147
+ my $synced_query =
148
+ " SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's'); " ;
149
+ $node_twoways -> poll_query_until( ' d2 ' , $synced_query )
150
+ or die " Timed out while waiting for subscriber to synchronize data " ;
151
151
152
152
is($node_twoways -> safe_psql(' d2' , " SELECT count(f) FROM t" ),
153
153
$rows * 2, " 2x$rows rows in t" );
You can’t perform that action at this time.
0 commit comments