Skip to content

Commit

Permalink
Don't manually tamper with the state
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky committed May 16, 2022
1 parent e500434 commit d7934d8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions distributed/tests/test_worker_state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,12 @@ async def test_self_denounce_missing_data(c, s, a):
x = c.submit(inc, 1, key="x")
await x

# Manually wipe x from the worker
# (Using an endpoint like remove-replicas would inform the scheduler).
del a.data["x"]
del a.tasks["x"]
a.validate_state()
# Wipe x from the worker and lose the message that would inform the scheduler
a.handle_remove_replicas(keys=["x"], stimulus_id="test")
assert a.batched_stream.buffer == [
{"key": "x", "stimulus_id": "test", "op": "release-worker-data"}
]
a.batched_stream.buffer.clear()

y = c.submit(inc, x, key="y")
# The scheduler tries computing y, but a responds that x is not available.
Expand Down

0 comments on commit d7934d8

Please sign in to comment.