Skip to content

Commit

Permalink
Update test_genericJob.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen authored Oct 4, 2023
1 parent 7b609f6 commit d4bbe90
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/job/test_genericJob.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,11 +521,14 @@ def test_job_executor_cancel(self):
exe = ProcessPoolExecutor()
j.server.executor = exe
self.assertTrue(j.server.run_mode.executor)
exe.submit(sleep, 5) # This part is a bit hacky, but it basically simulates other jobs on the same executor
exe.submit(sleep, 1) # This part is a bit hacky, but it basically simulates other jobs on the same executor
j.run()
j.server.future.cancel()
sleep(1)
j.refresh_job_status()
self.assertEqual(j.project.db.get_job_status(j.job_id), "submitted")
sleep(1)
self.assertEqual(j.project.db.get_job_status(j.job_id), "aborted")
self.assertEqual(j.status, "aborted")
self.assertTrue(j.status.aborted)

def test_job_executor_wait(self):
Expand Down

0 comments on commit d4bbe90

Please sign in to comment.