-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
fix: print log entries if logging happens after teardown #7731
Conversation
0380530
to
4252c05
Compare
Sure
I think yelling at them is better than silently dropping the messages (it won't show up in reporters or anything). And I also think it's fair to expect people to clean up from their tests before exiting - a failure to do so is IMO a bug in their code.
I didn't test in watch mode - I thought it'd work the same. Will have to dig into that
Fixed |
3479ca7
to
16c2957
Compare
Added some color: @jeysal I have no issues with watch mode... Re-runs look the same |
d05b222
to
82b6231
Compare
Not sure why this broke forceExit :( |
The BTW sorry, still didn't get around to reviewing properly, I'll try to do it tomorrow |
Cool, makes sense. Fixed it (by just looking at stderr) |
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'm still not getting the warning sometimes, now even without --watch
. Might just be overlooking something, but I'll have to investigate later
2703742
to
ff7990c
Compare
Regarding the missing warnings in watch mode, it looks like this is just me hitting the console output issue, because even on |
Oh, that's weird! I don't have that issue... If you could try to get a fix, that'd be awesome 🙂 |
It's super annoying to hunt down - it doesn't occur in |
Do we perhaps kill workers while they still have the |
It's definitely some gross race condition. |
Looks like this was the right idea. If I delay the worker cleanup in https://github.com/facebook/jest/blob/master/packages/jest-runner/src/index.js#L157, |
We can wait say 100-200ms before killing the worker without much issue. Best would be if we could query the worker if it's done or not though |
Yep, that's what I had in mind. Looks like I'll finally get to dig deeper into the worker stuff then 😄 |
FYI I looked into this for 1-2h today. |
I think that makes sense. @mjesun @rubennorte @scotthovestadt any reason not to make that change? |
Sounds good to me. Let's be extra-sure that the worker can't hang forever, though. :) |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Ref #3853
With this test:
Before this PR:
After this PR:
Test plan
Integration test added