test: reduce flakiness of test-worker-memory

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67513
Reviewed-By: Stewart X Addison <sxa@redhat.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
This commit is contained in:
Antoine du Hamel authored and GitHub committed 2026-11-18 09:48:31 +00:00
1 parent c463765478
commit 528ff04af5
1 file changed
+3 -3
+3 -3
View File
@@ -8,11 +8,11 @@ const util = require('util');
const { Worker } = require('worker_threads');
let numWorkers = +process.env.JOBS || require('os').availableParallelism();
if (numWorkers > 20) {
// Cap the number of workers at 20 (as an even divisor of 60 used as
if (numWorkers > 10) {
// Cap the number of workers at 10 (as an even divisor of 60 used as
// the total number of workers started) otherwise the test fails on
// machines with high core counts.
numWorkers = 20;
numWorkers = 10;
}
// Verify that a Worker's memory isn't kept in memory after the thread finishes.