Skip to content

Commit

Permalink
test: reduce number of repetition in test-heapdump-shadowrealm.js
Browse files Browse the repository at this point in the history
ShadowRealm garbage-collection is covered in another test. Reduce the
number of repetition in test-heapdump-shadowrealm.js trying to fix the
flakiness of the test.

PR-URL: nodejs#50104
Refs: nodejs#49572
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
  • Loading branch information
legendecas authored and alexfernandez committed Nov 1, 2023
1 parent 41f3c3b commit 8fba5c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/pummel/test-heapdump-shadow-realm.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let counter = 0;
// snapshot can handle it.
function createRealms() {
// Use setImmediate to give GC some time to kick in to avoid OOM.
if (counter++ < 100) {
if (counter++ < 10) {
realm = new ShadowRealm();
realm.evaluate('undefined');
setImmediate(createRealms);
Expand Down

0 comments on commit 8fba5c2

Please sign in to comment.