Skip to content
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

Investigate/fix test_cancel_running_job() in test_job.py #1022

Merged
merged 9 commits into from
Aug 28, 2023
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
fixes:
- |
Fixes a race condition in the function `test_cancel_running_job()` in `test_job.py`
where job cancellation could not be performed.
Refer to #1019 <https://github.com/Qiskit/qiskit-ibm-runtime/issues/1019>_ for
more details.
6 changes: 3 additions & 3 deletions test/integration/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ def test_cancel_job_running(self, service):
service,
circuits=[ReferenceCircuits.bell()] * 10,
)
if not cancel_job_safe(job, self.log):
return
time.sleep(10) # Wait a bit for DB to update.
rjob = service.job(job.job_id())
if not cancel_job_safe(rjob, self.log):
return
time.sleep(10)
self.assertEqual(rjob.status(), JobStatus.CANCELLED)

@run_integration_test
Expand Down