Skip to content

Commit 57b70b3

Browse files
joyeecheungaduh95
authored andcommitted
test: make test-v8-collect-gc-profile-minor-ms more robust
There can be more than one garbage collection triggered by one gc() call and it's not controllable by Node.js. Update the assertion to check that at least one expected GC is there, but don't check that there aren't more. Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com> PR-URL: #67547 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 4ac5123 commit 57b70b3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎test/parallel/test-v8-collect-gc-profile-minor-ms.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ profiler.start();
1010
global.gc({ type: 'minor', execution: 'sync' });
1111

1212
const profile = profiler.stop();
13-
assert.deepStrictEqual(
13+
assert.partialDeepStrictEqual(
1414
profile.statistics.map(({ gcType }) => gcType),
1515
['MinorMarkSweep'],
1616
);

0 commit comments

Comments
 (0)