From 214997a99ef89e346c838b01b27d9891343919d6 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Thu, 12 Oct 2023 17:32:42 +0800 Subject: [PATCH] test: reduce number of repetition in test-heapdump-shadowrealm.js 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: https://github.com/nodejs/node/pull/50104 Refs: https://github.com/nodejs/node/issues/49572 Reviewed-By: Luigi Pinca Reviewed-By: Yagiz Nizipli --- test/pummel/test-heapdump-shadow-realm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/pummel/test-heapdump-shadow-realm.js b/test/pummel/test-heapdump-shadow-realm.js index 7ec40118c5b9ca..1482fe6b6fcb8b 100644 --- a/test/pummel/test-heapdump-shadow-realm.js +++ b/test/pummel/test-heapdump-shadow-realm.js @@ -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);