diff --git a/test/pummel/test-policy-integrity.js b/test/pummel/test-policy-integrity.js index 3965372ed84351..db1589c5ffe834 100644 --- a/test/pummel/test-policy-integrity.js +++ b/test/pummel/test-policy-integrity.js @@ -13,6 +13,8 @@ const fs = require('fs'); const path = require('path'); const { pathToFileURL } = require('url'); +const cpus = require('os').cpus().length; + function hash(algo, body) { const values = []; { @@ -82,7 +84,7 @@ function queueSpawn(opts) { } function drainQueue() { - if (spawned > 50) { + if (spawned > cpus) { return; } if (toSpawn.length) { @@ -383,6 +385,5 @@ debug(`spawning ${tests.size} policy integrity permutations`); for (const config of tests) { const parsed = JSON.parse(config); - tests.delete(config); queueSpawn(parsed); }