@@ -1362,6 +1362,7 @@ def test_config_exclusion(self):
1362
1362
dst_options = {}
1363
1363
dst_options ['port' ] = str (dst_pg .port )
1364
1364
self .set_auto_conf (dst_pg , dst_options )
1365
+ dst_pg ._assign_master (src_pg )
1365
1366
dst_pg .slow_start (replica = True )
1366
1367
dst_pg .stop ()
1367
1368
@@ -1390,6 +1391,7 @@ def test_config_exclusion(self):
1390
1391
# check: run verification query
1391
1392
src_pg .safe_psql ("postgres" , "INSERT INTO ultimate_question VALUES(42)" )
1392
1393
src_query_result = src_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
1394
+ dst_pg .catchup () # wait for replication
1393
1395
dst_query_result = dst_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
1394
1396
self .assertEqual (src_query_result , dst_query_result , 'Different answer from copy' )
1395
1397
@@ -1419,6 +1421,7 @@ def test_config_exclusion(self):
1419
1421
# check: run verification query
1420
1422
src_pg .safe_psql ("postgres" , "INSERT INTO ultimate_question VALUES(2*42)" )
1421
1423
src_query_result = src_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
1424
+ dst_pg .catchup () # wait for replication
1422
1425
dst_query_result = dst_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
1423
1426
self .assertEqual (src_query_result , dst_query_result , 'Different answer from copy' )
1424
1427
@@ -1447,6 +1450,7 @@ def test_config_exclusion(self):
1447
1450
# check: run verification query
1448
1451
src_pg .safe_psql ("postgres" , "INSERT INTO ultimate_question VALUES(3*42)" )
1449
1452
src_query_result = src_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
1453
+ dst_pg .catchup () # wait for replication
1450
1454
dst_query_result = dst_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
1451
1455
self .assertEqual (src_query_result , dst_query_result , 'Different answer from copy' )
1452
1456
0 commit comments