-
Notifications
You must be signed in to change notification settings - Fork 234
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
Terminate the test loop if shouldfail
or shouldstop
is set
#1026
Terminate the test loop if shouldfail
or shouldstop
is set
#1026
Conversation
shouldfail
or shouldstop
is setshouldfail
or shouldstop
is set
@bluetech are we good to merge? |
@bluetech I found a new solution that does the same thing (stopping the worker when the global max is reached) without needing any changes to |
If I understand the new solution, when reaching Reading the code, I'm thinking perhaps we go back to something like the previous solution, but make it safe. I'm not sure it would work out, but if does I think it will fix the issue cleanly. WDYT? |
Yeah I agree that is a cleaner solution and I like that it propagates the worker session
The failure occurs on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update, I think the approach is good now. I left a couple of comments on the code.
…removal using for/else logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I will merge in a few days, maybe @RonnyPfannschmidt or @nicoddemus want to take a look as well.
@bbrown1867 Can you add a Added proper handling of ``shouldstop`` (such as set by ``--max-fail``) and ``shouldfail`` conditions in workers.
Previously, a worker might have continued executing further tests before the controller could terminate the session. |
Done! Thanks for drafting that |
…2279) Closes #11706. Originally fixed in #11721, but then reverted in #12022 due to a regression in pytest-xdist. The regression was fixed on the pytest-xdist side in pytest-dev/pytest-xdist#1026.
Terminate the test loop if
shouldfail
orshouldstop
is set in a worker's pytestsession
Closes #1024.