Skip to content

Commit 70d297c

Browse files
tniessentargos
authored andcommitted
test: replace gc(true) with gc({ type: 'minor' })
V8 considers gc(true) legacy, and the new signature is much more expressive. PR-URL: #43493 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
1 parent 462e526 commit 70d297c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

test/node-api/test_buffer/test_finalizer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ process.on('uncaughtException', common.mustCall((err) => {
1616
throw new Error('finalizer error');
1717
}));
1818
}
19-
global.gc(true);
19+
global.gc({ type: 'minor' });
2020
await tick(common.platformTimeout(100));
2121
global.gc();
2222
await tick(common.platformTimeout(100));

test/parallel/test-net-write-fully-async-buffer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const server = net.createServer(common.mustCall(function(conn) {
2323
}
2424

2525
while (conn.write(Buffer.from(data)));
26-
global.gc(true);
26+
global.gc({ type: 'minor' });
2727
// The buffer allocated above should still be alive.
2828
}
2929

test/parallel/test-net-write-fully-async-hex-string.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const server = net.createServer(common.mustCall(function(conn) {
2121
}
2222

2323
while (conn.write(data, 'hex'));
24-
global.gc(true);
24+
global.gc({ type: 'minor' });
2525
// The buffer allocated inside the .write() call should still be alive.
2626
}
2727

0 commit comments

Comments
 (0)