Skip to content

Debug crashing jobs on executor with Python 3.11 #1200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
6 changes: 3 additions & 3 deletions tests/job/test_genericJob.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,13 +518,13 @@ def test_job_executor_run(self):
def test_job_executor_cancel(self):
j = self.project.create_job(ReturnCodeJob, "job_with_executor_cancel")
j.input["accepted_codes"] = [1]
exe = ProcessPoolExecutor()
exe = ProcessPoolExecutor(max_workers=1)
j.server.executor = exe
self.assertTrue(j.server.run_mode.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 = Future()
j.server.future.cancel()
j.refresh_job_status()
self.assertEqual(j.status, "aborted")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somehow the status remains in submitted rather than being switched to aborted.

self.assertTrue(j.status.aborted)

def test_job_executor_wait(self):
Expand Down