Skip to content

Commit bda34ea

Browse files
apapirovskitargos
authored andcommitted
test: check gc does not resurrect the loop
PR-URL: #21093 Fixes: #18190 Refs: #18307 Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 4f01168 commit bda34ea

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/sequential/test-async-wrap-getasyncid.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use strict';
2+
// Flags: --expose-gc
23

34
const common = require('../common');
45
const assert = require('assert');
@@ -22,6 +23,11 @@ common.crashOnUnhandledRejection();
2223
},
2324
}).enable();
2425
process.on('beforeExit', common.mustCall(() => {
26+
// This garbage collection call verifies that the wraps being garbage
27+
// collected doesn't resurrect the process again due to weirdly timed
28+
// uv_close calls and other similar instruments in destructors.
29+
global.gc();
30+
2531
process.removeAllListeners('uncaughtException');
2632
hooks.disable();
2733
delete providers.NONE; // Should never be used.

0 commit comments

Comments
 (0)