From 184a783bfd99a2ff798b5d368beec7be1c8d5cd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 6 Mar 2021 11:38:35 +0100 Subject: [PATCH] test: ignore WPT worker errors after tests finished This can happen normally, for example in timers tests. PR-URL: https://github.com/nodejs/node/pull/37626 Reviewed-By: Antoine du Hamel Reviewed-By: Rich Trott --- test/common/wpt.js | 5 +++++ test/wpt/status/html/webappapis/timers.json | 15 +-------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/test/common/wpt.js b/test/common/wpt.js index 89ec1f5148c20e..43b363334008d5 100644 --- a/test/common/wpt.js +++ b/test/common/wpt.js @@ -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, { diff --git a/test/wpt/status/html/webappapis/timers.json b/test/wpt/status/html/webappapis/timers.json index 69d7095511f41c..0967ef424bce67 100644 --- a/test/wpt/status/html/webappapis/timers.json +++ b/test/wpt/status/html/webappapis/timers.json @@ -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" - } -} +{}