Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions distributed/tests/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1939,6 +1939,7 @@ def f(x):
assert not C.instances


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

with pytest.raises(asyncio.TimeoutError):
await h.result(timeout=0.5)
await h.result(timeout=0.8)

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

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