Skip to content

Commit

Permalink
Fix unit test scheduler local driver (equinor#6894)
Browse files Browse the repository at this point in the history
This commit fixes unit_tests/scheduler/test_local_driver.py::test_that_killing_killed_job_does_not_raise by changing the stub process to sleep 10 instead of 5. This is an exact copy of the test_kill test above it. The bug was that the process was already done by the time we tried killing it.
  • Loading branch information
jonathan-eq authored Jan 4, 2024
1 parent 533fef7 commit 9123159
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/unit_tests/scheduler/test_local_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async def test_kill_when_job_finished(tmp_path, cmd, event):

async def test_that_killing_killed_job_does_not_raise(tmp_path):
driver = LocalDriver()
await driver.submit(23, "/usr/bin/env", "sleep 5", cwd=tmp_path)
await driver.submit(23, "/usr/bin/env", "sleep", "10", cwd=tmp_path)
assert await driver.event_queue.get() == (23, JobEvent.STARTED)
await driver.kill(23)
assert await driver.event_queue.get() == (23, JobEvent.ABORTED)
Expand Down

0 comments on commit 9123159

Please sign in to comment.