From 85f58703e81a56ca25bd7a9324e8534bf891f1b7 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Wed, 2 Dec 2026 15:57:50 +0100 Subject: [PATCH] test: remove tests that assert existence of minor mark-sweep This depends on V8 to actually issue a minor mark-sweep which is deprecated. Signed-off-by: Joyee Cheung --- test/parallel/test-performance-gc-minor-ms.js | 36 ------------------- .../test-v8-collect-gc-profile-minor-ms.js | 16 --------- 2 files changed, 52 deletions(-) delete mode 100644 test/parallel/test-performance-gc-minor-ms.js delete mode 100644 test/parallel/test-v8-collect-gc-profile-minor-ms.js diff --git a/test/parallel/test-performance-gc-minor-ms.js b/test/parallel/test-performance-gc-minor-ms.js deleted file mode 100644 index 322d22c6b002..000000000000 --- a/test/parallel/test-performance-gc-minor-ms.js +++ /dev/null @@ -1,36 +0,0 @@ -// Flags: --expose-gc --no-warnings --minor-ms -'use strict'; - -// When V8's Minor Mark-Sweep collector is enabled (--minor-ms), minor garbage -// collections are reported with kind NODE_PERFORMANCE_GC_MINOR_MARK_SWEEP -// rather than NODE_PERFORMANCE_GC_MINOR. - -const common = require('../common'); -const assert = require('assert'); -const { gcUntil } = require('../common/gc'); -const { - PerformanceObserver, - constants -} = require('perf_hooks'); - -const { - NODE_PERFORMANCE_GC_MINOR_MARK_SWEEP -} = constants; - -let observed = false; -const obs = new PerformanceObserver(common.mustCallAtLeast((list) => { - for (const entry of list.getEntries()) { - // Other GC kinds (e.g. a scheduled or incremental GC) may be observed in - // between; only the minor mark-sweep entry is relevant here. - if (entry.detail.kind === NODE_PERFORMANCE_GC_MINOR_MARK_SWEEP) { - assert.strictEqual(entry.name, 'gc'); - assert.strictEqual(entry.entryType, 'gc'); - observed = true; - obs.disconnect(); - return; - } - } -})); -obs.observe({ entryTypes: ['gc'] }); - -gcUntil('minor gc event', () => observed, 10, { type: 'minor' }); diff --git a/test/parallel/test-v8-collect-gc-profile-minor-ms.js b/test/parallel/test-v8-collect-gc-profile-minor-ms.js deleted file mode 100644 index 848caeb733a1..000000000000 --- a/test/parallel/test-v8-collect-gc-profile-minor-ms.js +++ /dev/null @@ -1,16 +0,0 @@ -// Flags: --expose-gc --minor-ms -'use strict'; - -require('../common'); -const assert = require('assert'); -const { GCProfiler } = require('v8'); - -const profiler = new GCProfiler(); -profiler.start(); -global.gc({ type: 'minor', execution: 'sync' }); - -const profile = profiler.stop(); -assert.partialDeepStrictEqual( - profile.statistics.map(({ gcType }) => gcType), - ['MinorMarkSweep'], -);