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

Conversation

robotAstray
Copy link
Contributor

@robotAstray robotAstray commented Aug 19, 2023

Summary

This PR addresses the issue described in Issue #1019,

Changes Made

- Modified the cancel method in runtime_job.py to handle status codes 409 and 204 as cases where job cancellation cannot be performed due to specific conditions. This ensures that the client-side status accurately reflects the server-side status.

  • Updated the test_cancel_job_running function to wait for the server-side status update after cancellation before performing assertions. This change ensures that the test accurately reflects the behaviour of cancelling a running job.

Fixes:

@CLAassistant
Copy link

CLAassistant commented Aug 19, 2023

CLA assistant check
All committers have signed the CLA.

@kt474 kt474 requested a review from merav-aharoni August 20, 2023 03:05
@robotAstray
Copy link
Contributor Author

robotAstray commented Aug 20, 2023

@kt474 I will fix the release notes as well

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5918090939

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 74.058%

Totals Coverage Status
Change from base Build 5906160217: 0.0%
Covered Lines: 2458
Relevant Lines: 3319

💛 - Coveralls

Copy link
Member

@kt474 kt474 left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this @robotAstray! I think there is still an issue with the cancel() method itself but that can be taken care of in a separate PR

#1038

@kt474 kt474 merged commit b9b3fda into Qiskit:main Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants