Skip to content

Commit

Permalink
add pool
Browse files Browse the repository at this point in the history
  • Loading branch information
alsugiliazova committed Feb 26, 2024
1 parent 294a092 commit 2069882
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions atomic_insert/tests/hard_restart.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 2069882

Please sign in to comment.