-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
test: fix flaky test-async-wrap-uncaughtexception #16598
Conversation
It's possible for `beforeExit` to be emitted more than once if work is scheduled by its listeners. Accommodate this fact in the test. Fixes: nodejs#16210
ping @joaocgreis @addaleax @joyeecheung I want to make sure this is the correct fix and not working around a legitimate bug in core that needs fixing. See #16210 for background/details. |
@nodejs/testing |
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.
The process.removeAllListeners('uncaughtException');
in L14 can be removed now?
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.
Not convinced this is the right fix.
I'm not sure this is the right fix.
|
I kind of have to side with @refack here – if this is a fix, then it’s not obvious where the second uncaught exception is coming from. From the looks of it, that would not be a bug in the test but rather a bug |
@joyeecheung testing (refack/node@master...refack:pr/16412) |
OK so there is definatly a change/regression. Seeing this locally with officialy build binaries: 8.6.0 ✔️
8.7.0 🔴
|
@refack |
I think I found the commit that is the likely culprit. See #16210 (comment) Closing this for now. |
It's possible for
beforeExit
to be emitted more than once if work isscheduled by its listeners. Accommodate this fact in the test.
Fixes: #16210
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test async-wrap