Closed Bug 1283902 Opened 4 years ago Closed 3 years ago

Intermittent toolkit/mozapps/extensions/test/browser/browser_webapi_install.js | Uncaught exception - Error: expected onDownloadEnded but got onDownloadProgress

Categories

(Toolkit :: Add-ons Manager, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox50 --- fixed
firefox51 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: wisniewskit)

Details

(Keywords: intermittent-failure, Whiteboard: triaged)

Attachments

(1 file, 1 obsolete file)

This sounds like a case of the test just having to account for the possibility of more than one onDownloadProgress events before onDownloadEnded, but I can't seem to run the test locally: I get a "ReferenceError: SECURE_TESTROOT not found" message when I try this command:

>./mach mochitest -f browser toolkit/mozapps/extensions/test/browser/browser_webapi_install.js

Is there a special way one is meant to run these tests?
I agree with your assessment of the cause of the failure.

The problem you encountered is due to bug 1286016, the simplest workaround (assuming you're not on Windows) is to run one of the tests from browser.ini (e.g., browser_about.js) once and then run the webapi install test.
Thanks for that tip, Andrew!

Here's a patch that skips repeated progress events, so the test won't fail intermittently in that case.
Assignee: nobody → wisniewskit
Status: NEW → ASSIGNED
Attachment #8772191 - Flags: review?(gavin.sharp)
Priority: -- → P2
Whiteboard: triaged
Attachment #8772191 - Flags: review?(gavin.sharp) → review?(aswan)
Comment on attachment 8772191 [details] [diff] [review]
1283902-skip_repeated_onDownloadProgress_events_in_test.diff

This looks good, thanks!  (And sorry I missed your first review request)
But now that check() can run safely if receivedEvents is empty, can you update the code right below to just call check() immediately instead of deferring it if there are no queued events?
No problem, here's a version of the patch with that change.

Carrying over r+, and requesting checkin.
Attachment #8772191 - Attachment is obsolete: true
Attachment #8772191 - Flags: review?(aswan)
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/fx-team/rev/4b3698309e6c
Skip repeated onDownloadProgress events so the test may pass. r=aswan
Keywords: checkin-needed
nice, thanks Thomas!
https://hg.mozilla.org/mozilla-central/rev/4b3698309e6c
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.