Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 43c0174

Browse filesBrowse files
Trottaddaleax
authored andcommitted
test: revise test-policy-integrity
* eliminate unneeded Set deletion/cleanup * use number of CPUs as limit for processes spawned rather than hard-coding the limit PR-URL: #35101 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
1 parent 3954b8f commit 43c0174
Copy full SHA for 43c0174

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Open diff view settings
Collapse file

‎test/pummel/test-policy-integrity.js‎

Copy file name to clipboardExpand all lines: test/pummel/test-policy-integrity.js
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ const fs = require('fs');
1313
const path = require('path');
1414
const { pathToFileURL } = require('url');
1515

16+
const cpus = require('os').cpus().length;
17+
1618
function hash(algo, body) {
1719
const values = [];
1820
{
@@ -82,7 +84,7 @@ function queueSpawn(opts) {
8284
}
8385

8486
function drainQueue() {
85-
if (spawned > 50) {
87+
if (spawned > cpus) {
8688
return;
8789
}
8890
if (toSpawn.length) {
@@ -383,6 +385,5 @@ debug(`spawning ${tests.size} policy integrity permutations`);
383385

384386
for (const config of tests) {
385387
const parsed = JSON.parse(config);
386-
tests.delete(config);
387388
queueSpawn(parsed);
388389
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.