-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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 #16692
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,12 +15,18 @@ let hooks = null; | |
// under some conditions on variaous platforms. Using the once | ||
// handler here avoids the flakiness but ignores the underlying | ||
// cause of the flakiness. | ||
process.once('beforeExit', common.mustCall(() => { | ||
var n = 0; | ||
process.once('beforeExit', () => { | ||
console.log('.', call_log); | ||
if (++n === 2) { | ||
console.log('x'); | ||
process.exit(1); | ||
} | ||
process.removeAllListeners('uncaughtException'); | ||
hooks.disable(); | ||
assert.strictEqual(typeof call_id, 'number'); | ||
assert.deepStrictEqual(call_log, [1, 1, 1, 1]); | ||
})); | ||
// assert.strictEqual(typeof call_id, 'number'); | ||
// assert.deepStrictEqual(call_log, [1, 1, 1, 1]); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is just for testing... not planning on keeping this commit |
||
}); | ||
|
||
|
||
hooks = async_hooks.createHook({ | ||
|
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.
Nit: various