test: ignore late worker exceptions in WPT runner#63106
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #63106 +/- ##
==========================================
+ Coverage 90.31% 90.33% +0.02%
==========================================
Files 730 730
Lines 234463 234463
Branches 43908 43916 +8
==========================================
+ Hits 211763 211812 +49
+ Misses 14419 14374 -45
+ Partials 8281 8277 -4 🚀 New features to boost your workflow:
|
731ede1 to
f3f975a
Compare
|
You might want to update |
Can you elaborate? Is this rooted in the WPT runner browsers run, generally more context for review would be great. |
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
f3f975a to
f7e0a1a
Compare
It's actually WPT semantic. In I think WPT is mirroring the browser's beaviour where the uncaugth exceptions after Editing the description and the comment. |
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
Maybe I am missing something, but I don't think this change covers it. It seems |
Problem
WPT semantics: once
done()is called the test result is final. Browsers send any later exception towindow.onerrorand do not fail the test. Node's WPT worker forwarded post-completionuncaughtExceptions to the parent asWorker'error'events, which the runner reports as failures.Affected flaky tests:
wpt/test-timers→html/webappapis/timers/type-long-settimeout.any.jswpt/test-timers→html/webappapis/timers/type-long-setinterval.any.jsFix
Install a no-op
uncaughtExceptionhandler from insideadd_completion_callback, before posting completion. Late exceptions in the worker are then swallowed, matching browser semantics. Scope is one fixture per worker (oneWorkerper spec), so it cannot leak into other tests.