Skip to content

Commit d309eec

Browse files
authored
Merge pull request ClickHouse#78814 from MikhailBurdukov/fix_test_no_backoff_after_killing_mutation
Trying to stabilize `test_no_backoff_after_killing_mutation`
2 parents 267f840 + 3eb6824 commit d309eec

File tree

1 file changed

+19
-6
lines changed
  • tests/integration/test_postpone_failed_tasks

1 file changed

+19
-6
lines changed

tests/integration/test_postpone_failed_tasks/test.py

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,22 @@ def test_no_backoff_after_killing_mutation(started_cluster, replicated_table):
247247
node.query(
248248
f"KILL MUTATION WHERE table = 'test_table' AND mutation_id = '{mutation_ids[0]}'"
249249
)
250-
node.rotate_logs()
251-
assert not node.contains_in_log(
252-
REPLICATED_POSTPONE_LOG
253-
if replicated_table
254-
else NON_REPLICATED_POSTPONE_MUTATION_LOG
255-
)
250+
251+
retry_count = 10
252+
for retry in range(retry_count):
253+
node.rotate_logs()
254+
try:
255+
node.wait_for_log_line(
256+
(
257+
REPLICATED_POSTPONE_LOG
258+
if replicated_table
259+
else NON_REPLICATED_POSTPONE_MUTATION_LOG
260+
),
261+
timeout=5,
262+
)
263+
except Exception:
264+
## the log line not found.
265+
break
266+
267+
if retry == retry_count - 1:
268+
assert False, "After killing the mutatuion it is still executed"

0 commit comments

Comments
 (0)