summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFilip Skokan <panva.ip@gmail.com>2023-05-05 10:40:33 +0200
committerGitHub <noreply@github.com>2023-05-05 08:40:33 +0000
commit3d003543b76fbc658f4101a1e78a686be57eab09 (patch)
tree65a4a443e6b4025967fa99031ce8100225083c28 /test
parentd55b84ba34ff891976bb7535f92b6136a694fe64 (diff)
downloadnode-new-3d003543b76fbc658f4101a1e78a686be57eab09.tar.gz
test: reduce WPT concurrency
PR-URL: https://github.com/nodejs/node/pull/47834 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/common/wpt.js5
-rw-r--r--test/wpt/test-timers.js2
-rw-r--r--test/wpt/testcfg.py2
3 files changed, 5 insertions, 4 deletions
diff --git a/test/common/wpt.js b/test/common/wpt.js
index 9b359877b2..cc7c5320fa 100644
--- a/test/common/wpt.js
+++ b/test/common/wpt.js
@@ -468,9 +468,10 @@ const limit = (concurrency) => {
};
class WPTRunner {
- constructor(path) {
+ constructor(path, { concurrency = os.availableParallelism() - 1 || 1 } = {}) {
this.path = path;
this.resource = new ResourceLoader(path);
+ this.concurrency = concurrency;
this.flags = [];
this.globalThisInitScripts = [];
@@ -595,7 +596,7 @@ class WPTRunner {
async runJsTests() {
const queue = this.buildQueue();
- const run = limit(os.availableParallelism());
+ const run = limit(this.concurrency);
for (const spec of queue) {
const content = spec.getContent();
diff --git a/test/wpt/test-timers.js b/test/wpt/test-timers.js
index 86b1cf35b8..efc2ee6e1e 100644
--- a/test/wpt/test-timers.js
+++ b/test/wpt/test-timers.js
@@ -2,6 +2,6 @@
const { WPTRunner } = require('../common/wpt');
-const runner = new WPTRunner('html/webappapis/timers');
+const runner = new WPTRunner('html/webappapis/timers', { concurrency: 1 });
runner.runJsTests();
diff --git a/test/wpt/testcfg.py b/test/wpt/testcfg.py
index db235699dd..3c356cf474 100644
--- a/test/wpt/testcfg.py
+++ b/test/wpt/testcfg.py
@@ -3,4 +3,4 @@ sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import testpy
def GetConfiguration(context, root):
- return testpy.ParallelTestConfiguration(context, root, 'wpt')
+ return testpy.SimpleTestConfiguration(context, root, 'wpt')