Skip to content

Commit a200dbb

Browse files
committed
test: fix flaky test-async-wrap-uncaughtexception
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
1 parent b8888f5 commit a200dbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-async-wrap-uncaughtexception.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ hooks = async_hooks.createHook({
3333
}).enable();
3434

3535

36-
process.on('uncaughtException', common.mustCall(() => {
36+
process.once('uncaughtException', common.mustCall(() => {
3737
assert.strictEqual(call_id, async_hooks.executionAsyncId());
3838
call_log[2]++;
3939
}));

0 commit comments

Comments
 (0)