Skip to content

Commit bb77e3b

Browse files
snopokeclaude
andcommitted
fix: de-flake celery retry test
task_success fires async; wait for the update count before asserting. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 9d5cc7c commit bb77e3b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/test_celery.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ def add_retry(self, a, b, is_retry=False):
316316
get_task.return_value = task_for_test()
317317
result = add_retry.delay(2, 2)
318318
assert result.get(timeout=10, propagate=True) == 4
319+
_wait_for_call_count(update, 4)
319320

320321
assert create.call_count == 2
321322
assert update.call_args_list == [
@@ -422,6 +423,7 @@ def task_signature(self, a):
422423

423424
result = chain.delay()
424425
assert result.get(timeout=10, propagate=True) == 16
426+
_wait_for_call_count(update, 6)
425427

426428
assert create.call_count == 3
427429
assert get_task.call_count == 3

0 commit comments

Comments
 (0)