Skip to content

Commit

Permalink
test: make node-api/test_buffer/test_finalizer not flaky
Browse files Browse the repository at this point in the history
PR-URL: nodejs/node#43418
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
  • Loading branch information
mcollina authored and guangwong committed Oct 10, 2022
1 parent f87ed19 commit b523d1b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/node-api/test_buffer/test_finalizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ process.on('uncaughtException', common.mustCall((err) => {
throw new Error('finalizer error');
}));
}
global.gc(true);
await tick(common.platformTimeout(100));
global.gc();
await tick(10);
await tick(common.platformTimeout(100));
global.gc();
await tick(common.platformTimeout(100));
})().then(common.mustCall());

0 comments on commit b523d1b

Please sign in to comment.