-
-
Notifications
You must be signed in to change notification settings - Fork 757
Closed
Description
def test_resumed_executing_task_releases_resources_on_reschedule(ws_with_running_task):
ws = ws_with_running_task
ws.handle_stimulus(FreeKeysEvent("cancel", ["x"]))
assert ws.tasks["x"].state == "cancelled"
assert ws.available_resources == {"R": 0}
instructions = ws.handle_stimulus(
ComputeTaskEvent.dummy(
key="y",
who_has={"x": ["127.0.0.1:1235"]},
nbytes={"x": 8},
stimulus_id="compute",
)
)
assert ws.tasks["x"].state == "resumed"
assert not instructions
ws.handle_stimulus(
RescheduleEvent(key="x", stimulus_id="reschedule")
)
assert ws.tasks["x"].state == "rescheduled"
assert ws.available_resources == {"R": 1}fails with distributed.worker_state_machine.InvalidTransition: InvalidTransition: x :: resumed->rescheduled. However, this might be a legitimate series of events to my understanding.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels