Closed Bug 1073159 Opened 11 years ago Closed 11 years ago

[System] fix update_manager.js tests with a newer mocha

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: julienw, Assigned: julienw)

References

Details

Attachments

(1 file)

In Bug 874510 we want to upgrade mocha to a newer version. Some system tests are failing with the newer mocha: 02:54:30 INFO - TEST-UNEXPECTED-FAIL | system/test/unit/update_manager_test.js | system/UpdateManager "after each" hook: wrapper - TypeError: self.toaster is null (app://system.gaiamobile.org/js/update_manager.js?time=1411552469686:489) 02:54:30 INFO - Error: TypeError: self.toaster is null (app://system.gaiamobile.org/js/update_manager.js?time=1411552469686:489) 02:54:30 INFO - at onerror (app://system.gaiamobile.org/common/vendor/mocha/mocha.js:5738:10) https://tbpl.mozilla.org/php/getParsedLog.php?id=48759080&tree=Gaia-Try#error17 I think we have another bug for this because this was actually already intermittent with the older mocha. However it's no more intermittent but permafail with the newer mocha.
Attached file github PR
So now I use the fake timers in the whole file, and we have no ugly timeouts anymore :) I also changed slightly how MockAppsMgmt is used in one test.
Attachment #8495465 - Flags: review?(etienne)
Comment on attachment 8495465 [details] [review] github PR :clap: :sparkles: :star2: :+1:
Attachment #8495465 - Flags: review?(etienne) → review+
master: e30d373eb5ed0514bce08a3b3d80d71b05a4dc32 thanks :)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: