diff --git a/test/node-api/test_buffer/test_finalizer.js b/test/node-api/test_buffer/test_finalizer.js index 372116bb3a05fc..b706c68c7c3e02 100644 --- a/test/node-api/test_buffer/test_finalizer.js +++ b/test/node-api/test_buffer/test_finalizer.js @@ -16,7 +16,7 @@ process.on('uncaughtException', common.mustCall((err) => { throw new Error('finalizer error'); })); } - global.gc(true); + global.gc({ type: 'minor' }); await tick(common.platformTimeout(100)); global.gc(); await tick(common.platformTimeout(100)); diff --git a/test/parallel/test-net-write-fully-async-buffer.js b/test/parallel/test-net-write-fully-async-buffer.js index 207ae24f6a32d0..0dddb51bd76ade 100644 --- a/test/parallel/test-net-write-fully-async-buffer.js +++ b/test/parallel/test-net-write-fully-async-buffer.js @@ -23,7 +23,7 @@ const server = net.createServer(common.mustCall(function(conn) { } while (conn.write(Buffer.from(data))); - global.gc(true); + global.gc({ type: 'minor' }); // The buffer allocated above should still be alive. } diff --git a/test/parallel/test-net-write-fully-async-hex-string.js b/test/parallel/test-net-write-fully-async-hex-string.js index f3115d8d2f795e..37b5cd75c1385c 100644 --- a/test/parallel/test-net-write-fully-async-hex-string.js +++ b/test/parallel/test-net-write-fully-async-hex-string.js @@ -21,7 +21,7 @@ const server = net.createServer(common.mustCall(function(conn) { } while (conn.write(data, 'hex')); - global.gc(true); + global.gc({ type: 'minor' }); // The buffer allocated inside the .write() call should still be alive. }