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

RESOLVED FIXED

Status

Mozilla QA
Mozmill Tests
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: davehunt, Assigned: davehunt)

Tracking

unspecified
Dependency tree / graph

Firefox Tracking Flags

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

Details

(Whiteboard: [mozmill-endurance])

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

5 years ago
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)

Comment 1

5 years ago
Created attachment 655985 [details] [diff] [review]
Catch endurance test failures. v1.0
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-
(Assignee)

Comment 3

5 years ago
Created attachment 656069 [details] [diff] [review]
Catch endurance test failures. v1.1
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-
(Assignee)

Comment 5

5 years ago
Created attachment 657914 [details] [diff] [review]
Catch endurance test failures. v2.0

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)
(Assignee)

Updated

5 years ago
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+
(Assignee)

Comment 7

5 years ago
Landed as:
http://hg.mozilla.org/qa/mozmill-tests/rev/a1ec7c125a2d (default)
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
status-firefox-esr10: --- → affected
status-firefox15: --- → affected
status-firefox16: --- → affected
status-firefox17: --- → affected
status-firefox18: --- → fixed
Resolution: --- → FIXED
Dave, can you please land the patch on the other branches?
(Assignee)

Comment 9

5 years ago
Of course. This was already on my schedule.

http://hg.mozilla.org/qa/mozmill-tests/rev/ee1ee0fd668f (aurora)
http://hg.mozilla.org/qa/mozmill-tests/rev/a9b6d4e43e64 (beta)
http://hg.mozilla.org/qa/mozmill-tests/rev/797cfc0e6d7d (release)
http://hg.mozilla.org/qa/mozmill-tests/rev/61d5165d441c (esr10)
(Assignee)

Updated

5 years ago
status-firefox-esr10: affected → fixed
status-firefox15: affected → fixed
status-firefox16: affected → fixed
status-firefox17: affected → fixed
It has not been landed on release and esr10 yet. Dave, please check your faulty commit and redo. Thanks.
status-firefox-esr10: fixed → affected
status-firefox15: fixed → affected
(Assignee)

Comment 11

5 years ago
Looks fine to me. Please check again.
status-firefox-esr10: affected → fixed
(Assignee)

Updated

5 years ago
status-firefox15: affected → fixed
Well, you finally pushed them now. Looks like that last step hasn't been done when you first did it. Thanks.
(Assignee)

Comment 13

5 years ago
Hmm.. I'm not sure what happened then.
You need to log in before you can comment on or make changes to this bug.