Terminate the test loop if shouldfail or shouldstop is set#1026
Terminate the test loop if shouldfail or shouldstop is set#1026bluetech merged 11 commits intopytest-dev:masterfrom bbrown1867:bbrown1867/1024/exit-faster-when-xfailed
shouldfail or shouldstop is set#1026Conversation
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 |
bluetech
left a comment
There was a problem hiding this comment.
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
bluetech
left a comment
There was a problem hiding this comment.
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
shouldfailorshouldstopis set in a worker's pytestsessionCloses #1024.