Skip to content

Commit

Permalink
Stabilized test_mutable_errback_called_by_chord_from_group_fail_multiple
Browse files Browse the repository at this point in the history
  • Loading branch information
Nusnus committed Oct 20, 2022
1 parent 7d4fe22 commit 997de5d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions t/integration/test_canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -2472,6 +2472,7 @@ def test_immutable_errback_called_by_chord_from_group_fail_multiple(
await_redis_count(fail_task_count, redis_key=redis_key)
redis_connection.delete(redis_key)

@flaky
@pytest.mark.parametrize(
"errback_task", [errback_old_style, errback_new_style, ],
)
Expand All @@ -2482,7 +2483,7 @@ def test_mutable_errback_called_by_chord_from_group_fail_multiple(
raise pytest.skip("Requires redis result backend.")
redis_connection = get_redis_connection()

fail_task_count = 42
fail_task_count = 14
# We have to use failing task signatures with unique task IDs to ensure
# the chord can complete when they are used as part of its header!
fail_sigs = tuple(
Expand All @@ -2492,7 +2493,7 @@ def test_mutable_errback_called_by_chord_from_group_fail_multiple(
errback = errback_task.s()
# Include a mix of passing and failing tasks
child_sig = group(
*(identity.si(42) for _ in range(24)), # arbitrary task count
*(identity.si(42) for _ in range(8)), # arbitrary task count
*fail_sigs,
)

Expand All @@ -2502,7 +2503,7 @@ def test_mutable_errback_called_by_chord_from_group_fail_multiple(
redis_connection.delete(expected_redis_key)
with subtests.test(msg="Error propagates from header group"):
res = chord_sig.delay()
sleep(1)
sleep(2)
with pytest.raises(ExpectedException):
res.get(timeout=TIMEOUT)
with subtests.test(msg="Errback is called after header group fails"):
Expand All @@ -2516,7 +2517,7 @@ def test_mutable_errback_called_by_chord_from_group_fail_multiple(
redis_connection.delete(fail_sig_id)
with subtests.test(msg="Error propagates from body group"):
res = chord_sig.delay()
sleep(1)
sleep(2)
with pytest.raises(ExpectedException):
res.get(timeout=TIMEOUT)
with subtests.test(msg="Errback is called after body group fails"):
Expand Down

0 comments on commit 997de5d

Please sign in to comment.