Skip to content

Commit f7edb07

Browse files
targosdanielleadams
authored andcommitted
test: terminate WPT workers after test completion
PR-URL: #37627 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent b7ef829 commit f7edb07

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

test/common/wpt.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ class WPTRunner {
299299

300300
this.results = {};
301301
this.inProgress = new Set();
302+
this.workers = new Map();
302303
this.unexpectedFailures = [];
303304
}
304305

@@ -376,6 +377,7 @@ class WPTRunner {
376377
scriptsToRun,
377378
},
378379
});
380+
this.workers.set(testFileName, worker);
379381

380382
worker.on('message', (message) => {
381383
switch (message.type) {
@@ -501,6 +503,9 @@ class WPTRunner {
501503
this.resultCallback(filename, { status: 2, name: 'Unknown' });
502504
}
503505
this.inProgress.delete(filename);
506+
// Always force termination of the worker. Some tests allocate resources
507+
// that would otherwise keep it alive.
508+
this.workers.get(filename).terminate();
504509
}
505510

506511
addTestResult(filename, item) {

test/wpt/status/FileAPI/blob.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Blob-constructor.any.js": {
3-
"skip": "https://github.com/nodejs/node/issues/37358"
3+
"skip": "Depends on File API"
44
},
55
"Blob-constructor-dom.window.js": {
66
"skip": "Depends on DOM API"

0 commit comments

Comments
 (0)