Skip to content

Commit

Permalink
Make test_steal_reschedule_reset_in_flight_occupancy non timing depen…
Browse files Browse the repository at this point in the history
…dent (#7010)
  • Loading branch information
fjetter authored Sep 6, 2022
1 parent 79ca60b commit 1b22df2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion distributed/tests/test_steal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,17 @@ async def test_steal_reschedule_reset_in_flight_occupancy(c, s, *workers):
range(6),
key=[f"r-{ix}" for ix in range(6)],
)
futs1 = [c.submit(slowinc, f, key=f"f1-{ix}") for f in roots for ix in range(4)]

def block(x, event):
event.wait()
return x + 1

event = Event()
futs1 = [
c.submit(block, f, event=event, key=f"f1-{ix}")
for f in roots
for ix in range(4)
]
while not w0.state.ready:
await asyncio.sleep(0.01)

Expand All @@ -1115,6 +1125,7 @@ async def test_steal_reschedule_reset_in_flight_occupancy(c, s, *workers):
steal.move_task_request(victim_ts, wsA, wsB)

s.reschedule(victim_key, stimulus_id="test")
await event.set()
await c.gather(futs1)

del futs1
Expand Down

0 comments on commit 1b22df2

Please sign in to comment.