From 206988210388ab42d1fc972f6cea2eda09323e3b Mon Sep 17 00:00:00 2001 From: alsugiliazova Date: Mon, 26 Feb 2024 08:56:29 +0000 Subject: [PATCH] add pool --- atomic_insert/tests/hard_restart.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/atomic_insert/tests/hard_restart.py b/atomic_insert/tests/hard_restart.py index f40677026..0dae51ec6 100644 --- a/atomic_insert/tests/hard_restart.py +++ b/atomic_insert/tests/hard_restart.py @@ -63,15 +63,21 @@ def hard_restart( with When( "I make different inserts into table and kill clickhouse server process in parallel" ): - By("I make transaction insert", test=simple_transaction_insert, parallel=True)( - core_table=tables[0], numbers=numbers, no_checks=True - ) - - By( - name="killing clickhouse process", - test=kill_clickhouse_process, - parallel=True, - )(signal=signal) + with Pool(2) as executor: + By( + "I make transaction insert", + test=simple_transaction_insert, + parallel=True, + executor=executor, + )(core_table=tables[0], numbers=numbers, no_checks=True) + + By( + name="killing clickhouse process", + test=kill_clickhouse_process, + parallel=True, + executor=executor, + )(signal=signal) + join() with And("I restart server"): node.start_clickhouse()