Skip to content

Commit

Permalink
Improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikmakait committed Jan 4, 2023
1 parent e094d5d commit cd8ddff
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions distributed/shuffle/tests/test_shuffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -1022,19 +1022,26 @@ async def test_restart_cluster_between_repeats(c, s, a):
seed=42,
)

await c.compute(dd.shuffle.shuffle(df, "y", shuffle="p2p"))
await clean_scheduler(s)

assert scheduler_extension.tombstones

# Cannot rerun forgotten shuffle due to tombstone
with pytest.raises(RuntimeError, match="shuffle_transfer"):
await c.compute(dd.shuffle.shuffle(df, "y", shuffle="p2p"))

out = dd.shuffle.shuffle(df, "x", shuffle="p2p")
await c.compute(out)
assert scheduler_extension.shuffle_ids()

await c.compute(dd.shuffle.shuffle(df, "y", shuffle="p2p"))
assert scheduler_extension.tombstones

await c.restart()
await clean_scheduler(s)
assert not scheduler_extension.tombstones

await c.compute(out)
await c.compute(dd.shuffle.shuffle(df, "y", shuffle="p2p"))
del out
await clean_scheduler(s)


Expand Down

0 comments on commit cd8ddff

Please sign in to comment.