mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
test: terminate WPT workers after test completion
PR-URL: https://github.com/nodejs/node/pull/37627 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
parent
b7ef829dac
commit
f7edb07ec2
|
|
@ -299,6 +299,7 @@ class WPTRunner {
|
|||
|
||||
this.results = {};
|
||||
this.inProgress = new Set();
|
||||
this.workers = new Map();
|
||||
this.unexpectedFailures = [];
|
||||
}
|
||||
|
||||
|
|
@ -376,6 +377,7 @@ class WPTRunner {
|
|||
scriptsToRun,
|
||||
},
|
||||
});
|
||||
this.workers.set(testFileName, worker);
|
||||
|
||||
worker.on('message', (message) => {
|
||||
switch (message.type) {
|
||||
|
|
@ -501,6 +503,9 @@ class WPTRunner {
|
|||
this.resultCallback(filename, { status: 2, name: 'Unknown' });
|
||||
}
|
||||
this.inProgress.delete(filename);
|
||||
// Always force termination of the worker. Some tests allocate resources
|
||||
// that would otherwise keep it alive.
|
||||
this.workers.get(filename).terminate();
|
||||
}
|
||||
|
||||
addTestResult(filename, item) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"Blob-constructor.any.js": {
|
||||
"skip": "https://github.com/nodejs/node/issues/37358"
|
||||
"skip": "Depends on File API"
|
||||
},
|
||||
"Blob-constructor-dom.window.js": {
|
||||
"skip": "Depends on DOM API"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user