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: #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 targos committed Jul 12, 2022
1 parent 58646ea commit 3948acc
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 3948acc

Please sign in to comment.