-
Notifications
You must be signed in to change notification settings - Fork 64
switch to thread timeout method when not on main-thread #88
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
Conversation
b000de3
to
02111fb
Compare
@flub I modified this PR to do two things:
|
@flub, can you review this? |
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.
I think one major problem you still have is that timeout_timer()
unconditionally disables the capture manager and writes output. This is really not good if the thread could be interrupted by the exception since now the rest of the pytest run will behave really weirdly.
Also, there's some promising work done in #87, specifically d827511 which is exploring the same problem space. How do you think these two approaches compare?
I've updated this to only address #8 in order to have this merged. The other bit about async timeout needs more validation, but this fix needs to be merged now to fix the bug. |
Ok, that's fair enough. Could you also add an entry to the changelog in the README for this? I think you should go ahead and bump the major version to 2.0.0 since this is a behaviour change that people should probably notice. |
@flub Done. |
@flub Anything else? |
apparently some linting fixes... apologies that you didn't find this out before, stupid cryptocurrencies force me to press a silly button now before CI will run 😞 looks good otherwise! |
@flub Done. |
As pointed out in the other PR having a test which verifies this would be very nice. Quickly thinking about this you can probably use |
@flub This test may be sufficient. I declined to attempt to invoke pytest itself off the main thread because it's too difficult. |
ping @flub |
The test looks good I think. Looking forward to see this merged 👍 |
Hello! Is this worker crash fully fixed in 2.1.0?
stacks
|
@AZ-201 please submit a minimally reproducible example in a new issue if you experience a problem. |
This method times-out the thread on windows without crashing the test worker.