Skip to content

Commit 184a783

Browse files
committed
test: ignore WPT worker errors after tests finished
This can happen normally, for example in timers tests. PR-URL: #37626 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 5d4fc63 commit 184a783

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

test/common/wpt.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,11 @@ class WPTRunner {
389389
});
390390

391391
worker.on('error', (err) => {
392+
if (!this.inProgress.has(testFileName)) {
393+
// The test is already finished. Ignore errors that occur after it.
394+
// This can happen normally, for example in timers tests.
395+
return;
396+
}
392397
this.fail(
393398
testFileName,
394399
{
Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1 @@
1-
{
2-
"negative-settimeout.any.js": {
3-
"fail": "assert_unreached: Reached unreachable code"
4-
},
5-
"type-long-setinterval.any.js": {
6-
"fail": "assert_unreached: Reached unreachable code"
7-
},
8-
"type-long-settimeout.any.js": {
9-
"fail": "assert_unreached: Reached unreachable code"
10-
},
11-
"negative-setinterval.any.js": {
12-
"fail": "assert_unreached: Reached unreachable code"
13-
}
14-
}
1+
{}

0 commit comments

Comments
 (0)