Fail xpcshell tests in case of unexpected TypeError, ReferenceError, SyntaxError
Categories
(Testing :: XPCShell Harness, defect, P3)
Tracking
(Not tracked)
People
(Reporter: Yoric, Assigned: ahal)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Updated•7 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
This patch ensures that if we have raised a TypeError, SyntaxError or RangeError, we fail the test, even if the error was accidentally caught. This behavior can be deactivated manually as follows:
- either by manually calling
ChromeUtils.clearRecentJSDevError()
after having thrown the error (recommended if the test expected the error to be thrown); - or by calling
PromiseUtils.thisTestLeaksUncaughtRejectionsAndShouldBeFixed()
to postpone fixing the issue.
Depends on D94989
Updated•4 years ago
|
Reporter | ||
Comment 2•4 years ago
|
||
ahal, you're now in charge!
Assignee | ||
Comment 3•4 years ago
|
||
Here's a try push with the patch here and in the other bug landed:
https://treeherder.mozilla.org/jobs?repo=try&revision=5001964eda3c8713c4c63ca63741049f71904813
I'll make sure this is at least on our roadmap and try to come up with a plan to keep it moving forward.
Comment 4•4 years ago
|
||
(In reply to Andrew Halberstadt [:ahal] from comment #3)
Here's a try push with the patch here and in the other bug landed:
https://treeherder.mozilla.org/jobs?repo=try&revision=5001964eda3c8713c4c63ca63741049f71904813I'll make sure this is at least on our roadmap and try to come up with a plan to keep it moving forward.
Almost all of the errors seem to be "SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data", maybe we should ignore that specific error message?
Assignee | ||
Comment 5•4 years ago
|
||
I was hoping we could set up a key in the manifests to disable this feature per-test. Possibly also per issue per test, but maybe start with just disabling it outright at the test level. Of course I'm not sure when anyone will have time to work on that, so I'm sympathetic to something quick and dirty in the short term.
Updated•2 years ago
|
Comment 6•2 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:Yoric, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit auto_nag documentation.
Comment 7•2 years ago
|
||
Clear a needinfo that is pending on an inactive user.
Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE
.
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 8•2 years ago
|
||
This is something that we probably still want, but we can't land it until tests have all been updated or we come up with some sort of exception list system. It's likely also bitrotted by now.
Updated•2 years ago
|
Description
•