@@ -1362,6 +1362,7 @@ def test_config_exclusion(self):
13621362 dst_options = {}
13631363 dst_options ['port' ] = str (dst_pg .port )
13641364 self .set_auto_conf (dst_pg , dst_options )
1365+ dst_pg ._assign_master (src_pg )
13651366 dst_pg .slow_start (replica = True )
13661367 dst_pg .stop ()
13671368
@@ -1390,6 +1391,7 @@ def test_config_exclusion(self):
13901391 # check: run verification query
13911392 src_pg .safe_psql ("postgres" , "INSERT INTO ultimate_question VALUES(42)" )
13921393 src_query_result = src_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
1394+ dst_pg .catchup () # wait for replication
13931395 dst_query_result = dst_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
13941396 self .assertEqual (src_query_result , dst_query_result , 'Different answer from copy' )
13951397
@@ -1419,6 +1421,7 @@ def test_config_exclusion(self):
14191421 # check: run verification query
14201422 src_pg .safe_psql ("postgres" , "INSERT INTO ultimate_question VALUES(2*42)" )
14211423 src_query_result = src_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
1424+ dst_pg .catchup () # wait for replication
14221425 dst_query_result = dst_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
14231426 self .assertEqual (src_query_result , dst_query_result , 'Different answer from copy' )
14241427
@@ -1447,6 +1450,7 @@ def test_config_exclusion(self):
14471450 # check: run verification query
14481451 src_pg .safe_psql ("postgres" , "INSERT INTO ultimate_question VALUES(3*42)" )
14491452 src_query_result = src_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
1453+ dst_pg .catchup () # wait for replication
14501454 dst_query_result = dst_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
14511455 self .assertEqual (src_query_result , dst_query_result , 'Different answer from copy' )
14521456
0 commit comments