Closed Bug 786258 Opened 9 years ago Closed 9 years ago

Catch exceptions thrown in endurance tests so incomplete reports can be sent

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect)

defect
Not set
normal

Tracking

(firefox15 fixed, firefox16 fixed, firefox17 fixed, firefox18 fixed, firefox-esr10 fixed)

RESOLVED FIXED
Tracking Status
firefox15 --- fixed
firefox16 --- fixed
firefox17 --- fixed
firefox18 --- fixed
firefox-esr10 --- fixed

People

(Reporter: davehunt, Assigned: davehunt)

References

Details

(Whiteboard: [mozmill-endurance])

Attachments

(1 file, 2 obsolete files)

Currently an exception in an endurance test causes the report to be lost. By surrounding this in a try/catch we should be able to submit the incomplete report for investigation into the failure.
Assignee: nobody → dave.hunt
Status: NEW → ASSIGNED
Attachment #655985 - Flags: review?(hskupin)
Comment on attachment 655985 [details] [diff] [review]
Catch endurance test failures. v1.0

>+      } catch(e) {

nit: Add a blank after 'catch'.

>+        this._perfTracer.addCheckpoint("Test failure! " + e);

Don't add the whole object, but only e.message which will be enough.
Attachment #655985 - Flags: review?(hskupin) → review-
Attachment #655985 - Attachment is obsolete: true
Attachment #656069 - Flags: review?(hskupin)
Comment on attachment 656069 [details] [diff] [review]
Catch endurance test failures. v1.1

Review of attachment 656069 [details] [diff] [review]:
-----------------------------------------------------------------

::: lib/endurance.js
@@ +83,5 @@
> +      try {
> +        callback();
> +      } catch (e) {
> +        this._perfTracer.addCheckpoint("Test failure! " + e.message);
> +        throw e;

I have had an oversight yesterday. Sorry for not spotting it earlier. This will still not work due to the fact that we re-throw the exception at this point. We will add a checkpoint for sure but at the end we do not fire the enduranceResults event.

So I think a better approach here is to not add the test failure checkpoint but use a broader try/catch block so we can ensure to send the final data until the failure happened. Reason why we do not have to add the failure checkpoint is that this one is already present in the test failure report. So it's duplicated information.
Attachment #656069 - Flags: review?(hskupin) → review-
This time I'm using finally within the iteration to push the gathered checkpoints to the log, and then clear it. Outside the iteration I'm using finally to update the trigger the endurance results listener.

This change is dependant on a fix for the Mozmill Dashboard. A pull request for this can be found here: https://github.com/whimboo/mozmill-dashboard/pull/42

I also added iterations and currentIterations properties, which were useful in testing this fix.
Attachment #656069 - Attachment is obsolete: true
Attachment #657914 - Flags: review?(hskupin)
Blocks: 781238
Comment on attachment 657914 [details] [diff] [review]
Catch endurance test failures. v2.0

Review of attachment 657914 [details] [diff] [review]:
-----------------------------------------------------------------

Looks way better now.
Attachment #657914 - Flags: review?(hskupin) → review+
Landed as:
http://hg.mozilla.org/qa/mozmill-tests/rev/a1ec7c125a2d (default)
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Dave, can you please land the patch on the other branches?
It has not been landed on release and esr10 yet. Dave, please check your faulty commit and redo. Thanks.
Looks fine to me. Please check again.
Well, you finally pushed them now. Looks like that last step hasn't been done when you first did it. Thanks.
Hmm.. I'm not sure what happened then.
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.