Skip to content

Commit

Permalink
test: ignore WPT worker errors after tests finished
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
targos committed Mar 8, 2021
1 parent 5d4fc63 commit 184a783
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
5 changes: 5 additions & 0 deletions test/common/wpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,11 @@ class WPTRunner {
});

worker.on('error', (err) => {
if (!this.inProgress.has(testFileName)) {
// The test is already finished. Ignore errors that occur after it.
// This can happen normally, for example in timers tests.
return;
}
this.fail(
testFileName,
{
Expand Down
15 changes: 1 addition & 14 deletions test/wpt/status/html/webappapis/timers.json
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
{
"negative-settimeout.any.js": {
"fail": "assert_unreached: Reached unreachable code"
},
"type-long-setinterval.any.js": {
"fail": "assert_unreached: Reached unreachable code"
},
"type-long-settimeout.any.js": {
"fail": "assert_unreached: Reached unreachable code"
},
"negative-setinterval.any.js": {
"fail": "assert_unreached: Reached unreachable code"
}
}
{}

0 comments on commit 184a783

Please sign in to comment.