Skip to content

Commit

Permalink
no-sleep test
Browse files Browse the repository at this point in the history
  • Loading branch information
gjoseph92 committed Jun 17, 2021
1 parent 3498008 commit 6d91816
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions distributed/tests/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,11 @@ async def test_decide_worker_select_candidate_holding_no_deps(client, s, a, b, c
root = await client.scatter(1)
assert sum(root.key in worker.data for worker in [a, b, c]) == 1

start = time()
tasks = client.map(sleep, [root] * 6, pure=False)
tasks = client.map(inc, [root] * 6, pure=False)
await wait(tasks)
elapsed = time() - start

assert elapsed <= 4
assert all(root.key in worker.data for worker in [a, b, c])
assert len(a.data) == len(b.data) == len(c.data) == 3


@gen_cluster(client=True, nthreads=[("127.0.0.1", 1)] * 3)
Expand Down

0 comments on commit 6d91816

Please sign in to comment.