Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/internal/test_runner/test.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -53,7 +53,7 @@ const{
} = require('internal/validators');
const{setTimeout } = require('timers/promises');
const{TIMEOUT_MAX } = require('internal/timers');
const{cpus } = require('os');
const{availableParallelism } = require('os');
const{bigint: hrtime } = process.hrtime;
const kCallbackAndPromisePresent = 'callbackAndPromisePresent'
const kCancelledByParent = 'cancelledByParent'
Expand DownExpand Up@@ -216,8 +216,8 @@ class Test extends AsyncResource{

case 'boolean':
if (concurrency){
// TODO(cjihrig): Use uv_available_parallelism() once it lands.
this.concurrency = parent === null ? MathMax(cpus().length - 1, 1) : Infinity;
this.concurrency = parent === null ?
MathMax(availableParallelism() - 1, 1) : Infinity;
} else{
this.concurrency = 1;
}
Expand Down