@@ -44,7 +44,10 @@ def test_process_restart_recovery(self):
4444 self .insert_multiple_records (TEST_TABLE_NAME , all_test_data )
4545
4646 # ✅ PATTERN: Start replication with all data already present
47- self .start_replication ()
47+ # Use isolated configuration for proper test isolation
48+ from tests .utils .dynamic_config import create_dynamic_config
49+ isolated_config = create_dynamic_config (self .config_file )
50+ self .start_replication (config_file = isolated_config )
4851
4952 # Wait for complete synchronization
5053 self .wait_for_table_sync (TEST_TABLE_NAME , expected_count = len (all_test_data ))
@@ -65,8 +68,9 @@ def test_process_restart_recovery(self):
6568 if hasattr (self , 'db_runner' ) and self .db_runner :
6669 self .db_runner .stop ()
6770
68- # Create new runners for restart test
69- runner = RunAllRunner ()
71+ # Create new runners for restart test with isolated config
72+ isolated_config_restart = create_dynamic_config (self .config_file )
73+ runner = RunAllRunner (cfg_file = isolated_config_restart )
7074 runner .run ()
7175
7276 # Wait for restart and verify data consistency
@@ -96,7 +100,10 @@ def test_binlog_replicator_restart(self):
96100 self .insert_basic_record (TEST_TABLE_NAME , record ["name" ], record ["age" ])
97101
98102 # ✅ PATTERN: Start replication with all data already present
99- self .start_replication ()
103+ # Use isolated configuration for proper test isolation
104+ from tests .utils .dynamic_config import create_dynamic_config
105+ isolated_config = create_dynamic_config (self .config_file )
106+ self .start_replication (config_file = isolated_config )
100107
101108 # Wait for complete synchronization
102109 self .wait_for_table_sync (TEST_TABLE_NAME , expected_count = len (all_test_data ))
@@ -106,8 +113,10 @@ def test_binlog_replicator_restart(self):
106113 kill_process (binlog_pid )
107114 time .sleep (2 )
108115
109- # Restart test - create new runner
110- runner = RunAllRunner ()
116+ # Restart test - create new runner with proper isolated config
117+ from tests .utils .dynamic_config import create_dynamic_config
118+ isolated_config = create_dynamic_config (self .config_file )
119+ runner = RunAllRunner (cfg_file = isolated_config )
111120 runner .run ()
112121
113122 # Verify data consistency after binlog replicator restart
@@ -138,7 +147,10 @@ def test_db_replicator_restart(self):
138147 self .insert_basic_record (TEST_TABLE_NAME , record ["name" ], record ["age" ])
139148
140149 # ✅ PATTERN: Start replication with all data already present
141- self .start_replication ()
150+ # Use isolated configuration for proper test isolation
151+ from tests .utils .dynamic_config import create_dynamic_config
152+ isolated_config = create_dynamic_config (self .config_file )
153+ self .start_replication (config_file = isolated_config )
142154
143155 # Wait for complete synchronization
144156 self .wait_for_table_sync (TEST_TABLE_NAME , expected_count = len (all_test_data ))
@@ -148,8 +160,10 @@ def test_db_replicator_restart(self):
148160 kill_process (db_pid )
149161 time .sleep (2 )
150162
151- # Wait for automatic restart or create a new runner if needed
152- runner = RunAllRunner ()
163+ # Wait for automatic restart or create a new runner if needed with proper isolated config
164+ from tests .utils .dynamic_config import create_dynamic_config
165+ isolated_config = create_dynamic_config (self .config_file )
166+ runner = RunAllRunner (cfg_file = isolated_config )
153167 runner .run ()
154168 time .sleep (5 )
155169
@@ -168,8 +182,10 @@ def test_graceful_shutdown(self):
168182 initial_data = TestDataGenerator .basic_users ()[:2 ]
169183 self .insert_multiple_records (TEST_TABLE_NAME , initial_data )
170184
171- # Start replication
172- runner = RunAllRunner ()
185+ # Start replication with proper isolated config
186+ from tests .utils .dynamic_config import create_dynamic_config
187+ isolated_config = create_dynamic_config (self .config_file )
188+ runner = RunAllRunner (cfg_file = isolated_config )
173189 runner .run ()
174190
175191 # Wait for replication to start and set ClickHouse context
@@ -187,8 +203,10 @@ def test_graceful_shutdown(self):
187203 # Graceful stop
188204 runner .stop ()
189205
190- # Restart and verify the last-minute data was saved
191- runner = RunAllRunner ()
206+ # Restart and verify the last-minute data was saved with proper isolated config
207+ from tests .utils .dynamic_config import create_dynamic_config
208+ isolated_config = create_dynamic_config (self .config_file )
209+ runner = RunAllRunner (cfg_file = isolated_config )
192210 runner .run ()
193211
194212 # Verify all data persisted through graceful shutdown/restart cycle
0 commit comments