Closed Bug 983641 Opened 11 years ago Closed 11 years ago

Several DOM Apps tests seem to swallow errors

Categories

(Core Graveyard :: DOM: Apps, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla31

People

(Reporter: Yoric, Assigned: marco)

Details

Attachments

(1 file, 1 obsolete file)

Logs of DOM Apps tests indicate a few "Got exception:", without details. http://dxr.mozilla.org/mozilla-central/search?q=%22Got+exception%3A%22&case=true This is bad for several reasons: 1. if I understand this code correctly, it simply eats errors, even fatal ones; 2. dump() is bad form, we should rather use info() or ok().
Flags: needinfo?(mar.castelluccio)
(In reply to David Rajchenbach Teller [:Yoric] (please use "needinfo?") from comment #0) > Logs of DOM Apps tests indicate a few "Got exception:", without details. > > http://dxr.mozilla.org/mozilla-central/ > search?q=%22Got+exception%3A%22&case=true > > This is bad for several reasons: > 1. if I understand this code correctly, it simply eats errors, even fatal > ones; > 2. dump() is bad form, we should rather use info() or ok(). We should fix this, but I think that when an exception occurs the tests don't call |finish| and so they fail because of timeouts.
Flags: needinfo?(mar.castelluccio)
Based on a quick read of a recent log, I have the impression that this is not the case.
Attached patch Patch (obsolete) — Splinter Review
With this patch we explicitly fail these tests in case of exceptions instead of letting them fail for timeouts.
Assignee: nobody → mar.castelluccio
Status: NEW → ASSIGNED
Comment on attachment 8391181 [details] [diff] [review] Patch Why is it useful to print StopIteration?
(In reply to David Rajchenbach Teller [:Yoric] (please use "needinfo?") from comment #2) > Based on a quick read of a recent log, I have the impression that this is > not the case. If you throw inside a generator, the next call to next() should throw StopIteration. For example: function generator() { yield 0; referror yield 1; } var gen = generator(); gen.next() => 0 gen.next() => Reference Error: referror is not defined gen.next() => StopIteration So the code after |referror| doesn't get executed. Anyway it's quite subtle, so it's better to explicitly fail. (In reply to David Rajchenbach Teller [:Yoric] (please use "needinfo?") from comment #4) > Comment on attachment 8391181 [details] [diff] [review] > Patch > > Why is it useful to print StopIteration? No particular reason, I've left it just because it doesn't do any harm.
> (In reply to David Rajchenbach Teller [:Yoric] (please use "needinfo?") from > comment #4) > > Comment on attachment 8391181 [details] [diff] [review] > > Patch > > > > Why is it useful to print StopIteration? > > No particular reason, I've left it just because it doesn't do any harm. Well, it adds noise to the logs and it made me think that there was an error :) I believe that you should remove it.
Attached patch PatchSplinter Review
I think this is the cleanest way: - Remove the redundant messages ("Got exception: Stop iteration" and "All done" are useless). - Catch only StopIteration exceptions, letting the test infrastructure handle other exceptions.
Attachment #8391181 - Attachment is obsolete: true
Attachment #8391755 - Flags: review?(fabrice)
Comment on attachment 8391755 [details] [diff] [review] Patch Review of attachment 8391755 [details] [diff] [review]: ----------------------------------------------------------------- lgtm, but push to try before landing.
Attachment #8391755 - Flags: review?(fabrice) → review+
Keywords: checkin-needed
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → mozilla31
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: