Skip to content

Commit 346ab17

Browse files
committed
Update many_independent_leaves test
1 parent 768d660 commit 346ab17

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

distributed/tests/test_scheduler.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,16 @@ async def test_recompute_released_results(c, s, a, b):
100100
assert result == 1
101101

102102

103-
@gen_cluster(client=True)
103+
@gen_cluster(client=True, config={"distributed.scheduler.bandwidth": "1mb"})
104104
async def test_decide_worker_with_many_independent_leaves(c, s, a, b):
105+
# Make data large to penalize scheduling dependent tasks on other workers
106+
ballast = b"\0" * int(s.bandwidth)
105107
xs = await asyncio.gather(
106-
c.scatter(list(range(0, 100, 2)), workers=a.address),
107-
c.scatter(list(range(1, 100, 2)), workers=b.address),
108+
c.scatter([bytes(i) + ballast for i in range(0, 100, 2)], workers=a.address),
109+
c.scatter([bytes(i) + ballast for i in range(1, 100, 2)], workers=b.address),
108110
)
109111
xs = list(concat(zip(*xs)))
110-
ys = [delayed(inc)(x) for x in xs]
112+
ys = [delayed(lambda s: s[0])(x) for x in xs]
111113

112114
y2s = c.persist(ys)
113115
await wait(y2s)

0 commit comments

Comments
 (0)