@@ -207,6 +207,8 @@ def test_e2e_regular(config_file):
207207 mysql .execute (f'DROP TABLE { TEST_TABLE_NAME_3 } ' )
208208 assert_wait (lambda : TEST_TABLE_NAME_3 not in ch .get_tables ())
209209
210+ db_replicator_runner .stop ()
211+
210212
211213def test_e2e_multistatement ():
212214 cfg = config .Settings ()
@@ -272,6 +274,9 @@ def test_e2e_multistatement():
272274
273275 assert_wait (lambda : TEST_TABLE_NAME_2 in ch .get_tables ())
274276
277+ db_replicator_runner .stop ()
278+ binlog_replicator_runner .stop ()
279+
275280
276281def get_binlog_replicator_pid (cfg : config .Settings ):
277282 path = os .path .join (
@@ -516,11 +521,15 @@ def test_initial_only():
516521
517522 ch .execute_command (f'DROP DATABASE { TEST_DB_NAME } ' )
518523
524+ db_replicator_runner .stop ()
525+
519526 db_replicator_runner = DbReplicatorRunner (TEST_DB_NAME , additional_arguments = '--initial_only=True' )
520527 db_replicator_runner .run ()
521528 db_replicator_runner .wait_complete ()
522529 assert TEST_DB_NAME in ch .get_databases ()
523530
531+ db_replicator_runner .stop ()
532+
524533
525534def test_database_tables_filtering ():
526535 cfg = config .Settings ()
@@ -677,6 +686,9 @@ def test_datetime_exception():
677686 assert_wait (lambda : str (ch .select (TEST_TABLE_NAME , where = "name='Alex'" )[0 ]['test_date' ]) == '2015-06-02' )
678687 assert_wait (lambda : str (ch .select (TEST_TABLE_NAME , where = "name='Ivan'" )[0 ]['test_date' ]) == '2015-05-28' )
679688
689+ db_replicator_runner .stop ()
690+ binlog_replicator_runner .stop ()
691+
680692
681693def test_different_types_1 ():
682694 cfg = config .Settings ()
@@ -760,6 +772,8 @@ def test_different_types_1():
760772 )
761773 assert_wait (lambda : len (ch .select (TEST_TABLE_NAME )) == 3 )
762774
775+ db_replicator_runner .stop ()
776+ binlog_replicator_runner .stop ()
763777
764778def test_numeric_types_and_limits ():
765779 cfg = config .Settings ()
@@ -826,6 +840,9 @@ def test_numeric_types_and_limits():
826840 assert_wait (lambda : len (ch .select (TEST_TABLE_NAME , 'test6=4294967280' )) == 1 )
827841 assert_wait (lambda : len (ch .select (TEST_TABLE_NAME , 'test7=18446744073709551586' )) == 2 )
828842
843+ db_replicator_runner .stop ()
844+ binlog_replicator_runner .stop ()
845+
829846
830847def test_different_types_2 ():
831848 cfg = config .Settings ()
@@ -892,6 +909,9 @@ def test_different_types_2():
892909 )
893910 assert_wait (lambda : len (ch .select (TEST_TABLE_NAME )) == 3 )
894911
912+ db_replicator_runner .stop ()
913+ binlog_replicator_runner .stop ()
914+
895915
896916def test_json ():
897917 cfg = config .Settings ()
@@ -948,6 +968,9 @@ def test_json():
948968 assert json .loads (ch .select (TEST_TABLE_NAME , "name='Ivan'" )[0 ]['data' ])['c' ] == [1 , 2 , 3 ]
949969 assert json .loads (ch .select (TEST_TABLE_NAME , "name='Peter'" )[0 ]['data' ])['c' ] == [3 , 2 , 1 ]
950970
971+ db_replicator_runner .stop ()
972+ binlog_replicator_runner .stop ()
973+
951974
952975def test_string_primary_key (monkeypatch ):
953976 monkeypatch .setattr (DbReplicator , 'INITIAL_REPLICATION_BATCH_SIZE' , 1 )
@@ -1007,6 +1030,9 @@ def test_string_primary_key(monkeypatch):
10071030 )
10081031 assert_wait (lambda : len (ch .select (TEST_TABLE_NAME )) == 3 )
10091032
1033+ db_replicator_runner .stop ()
1034+ binlog_replicator_runner .stop ()
1035+
10101036
10111037def test_parse_mysql_table_structure ():
10121038 query = "CREATE TABLE IF NOT EXISTS user_preferences_portal (\n \t \t \t id char(36) NOT NULL,\n \t \t \t category varchar(50) DEFAULT NULL,\n \t \t \t deleted tinyint(1) DEFAULT 0,\n \t \t \t date_entered datetime DEFAULT NULL,\n \t \t \t date_modified datetime DEFAULT NULL,\n \t \t \t assigned_user_id char(36) DEFAULT NULL,\n \t \t \t contents longtext DEFAULT NULL\n \t \t ) ENGINE=InnoDB DEFAULT CHARSET=utf8"
0 commit comments