Skip to content

Commit 3728eb5

Browse files
committed
tests: fix test_quorum_inserts flakiness
Fix the unpredictible nature of test_insert_quorum_with_keeper_loss_connection, that leads to failures of other tests due to some failpoints leaved as active.
1 parent 0078bf7 commit 3728eb5

File tree

1 file changed

+15
-1
lines changed
  • tests/integration/test_quorum_inserts

1 file changed

+15
-1
lines changed

tests/integration/test_quorum_inserts/test.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,11 +379,25 @@ def test_insert_quorum_with_keeper_loss_connection(started_cluster):
379379
)
380380
)
381381

382+
zk = cluster.get_kazoo_client("zoo1")
383+
384+
# Ensure that part had been committed
385+
retries = 0
386+
while True:
387+
if zk.exists(
388+
f"/clickhouse/tables/{table_name}/replicas/zero/parts/all_0_0_0"
389+
):
390+
break
391+
print("replica still did not create all_0_0_0")
392+
time.sleep(1)
393+
retries += 1
394+
if retries == 120:
395+
raise Exception("Can not wait for all_0_0_0 part")
396+
382397
with PartitionManager() as pm:
383398
pm.drop_instance_zk_connections(zero)
384399

385400
retries = 0
386-
zk = cluster.get_kazoo_client("zoo1")
387401
while True:
388402
if (
389403
zk.exists(

0 commit comments

Comments
 (0)