diff options
author | Anatoli Papirovski <apapirovski@mac.com> | 2018-06-06 16:06:51 -0400 |
---|---|---|
committer | Anatoli Papirovski <apapirovski@mac.com> | 2018-06-09 19:09:47 -0700 |
commit | ff16545f609bf7833cd5c6cf10dd3993d1a849f0 (patch) | |
tree | 00a4f999a8b6a019007292dc69f2379e27e7c7c9 /test | |
parent | 9788da962e4860b848bcfe1bcd15b76b0f7eedd8 (diff) | |
download | android-node-v8-ff16545f609bf7833cd5c6cf10dd3993d1a849f0.tar.gz android-node-v8-ff16545f609bf7833cd5c6cf10dd3993d1a849f0.tar.bz2 android-node-v8-ff16545f609bf7833cd5c6cf10dd3993d1a849f0.zip |
test: check gc does not resurrect the loop
PR-URL: https://github.com/nodejs/node/pull/21093
Fixes: https://github.com/nodejs/node/issues/18190
Refs: https://github.com/nodejs/node/pull/18307
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/sequential/test-async-wrap-getasyncid.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/sequential/test-async-wrap-getasyncid.js b/test/sequential/test-async-wrap-getasyncid.js index c16624a79e..60309ecb2d 100644 --- a/test/sequential/test-async-wrap-getasyncid.js +++ b/test/sequential/test-async-wrap-getasyncid.js @@ -1,4 +1,5 @@ 'use strict'; +// Flags: --expose-gc const common = require('../common'); const assert = require('assert'); @@ -22,6 +23,11 @@ common.crashOnUnhandledRejection(); }, }).enable(); process.on('beforeExit', common.mustCall(() => { + // This garbage collection call verifies that the wraps being garbage + // collected doesn't resurrect the process again due to weirdly timed + // uv_close calls and other similar instruments in destructors. + global.gc(); + process.removeAllListeners('uncaughtException'); hooks.disable(); delete providers.NONE; // Should never be used. |