Skip to content

Commit 6272e20

Browse files
authored
Fix flaky test_gather_dep_one_worker_always_busy (#6554)
1 parent 059798a commit 6272e20

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

distributed/tests/test_worker.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1939,6 +1939,7 @@ def f(x):
19391939
assert not C.instances
19401940

19411941

1942+
@pytest.mark.slow
19421943
@gen_cluster(client=True)
19431944
async def test_gather_dep_one_worker_always_busy(c, s, a, b):
19441945
# Ensure that both dependencies for H are on another worker than H itself.
@@ -1966,12 +1967,14 @@ async def test_gather_dep_one_worker_always_busy(c, s, a, b):
19661967
assert b.tasks[g.key].state in ("flight", "fetch")
19671968

19681969
with pytest.raises(asyncio.TimeoutError):
1969-
await h.result(timeout=0.5)
1970+
await h.result(timeout=0.8)
19701971

19711972
story = b.story("busy-gather")
1972-
# 1 busy response straight away, followed by 1 retry every 150ms for 500ms.
1973+
# 1 busy response straight away, followed by 1 retry every 150ms for 800ms.
19731974
# The requests for b and g are clustered together in single messages.
1974-
assert 3 <= len(story) <= 7
1975+
# We need to be very lax in measuring as PeriodicCallback+network comms have been
1976+
# observed on CI to occasionally lag behind by several hundreds of ms.
1977+
assert 2 <= len(story) <= 8
19751978

19761979
async with Worker(s.address, name="x") as x:
19771980
# We "scatter" the data to another worker which is able to serve this data.

0 commit comments

Comments
 (0)