Closed Bug 1447086 Opened 2 years ago Closed 2 years ago

httpd.js should return a promise if no callback is provided in stop()

Categories

(Testing :: General, enhancement)

enhancement
Not set

Tracking

(firefox61 fixed)

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: tcsc, Assigned: tcsc)

Details

Attachments

(1 file)

There are a large number of places (for example [0], [1], and certainly more) where we construct manual promises to stop the server in an async test, or rely on. This is just annoying and it could be easily fixed, so we should do it.

Patch incoming, although I'm not sure who to request review from, feel free to reassign to someone better if I pick you.

[0]: https://searchfox.org/mozilla-central/search?q=server.stop(resolve)&case=false&regexp=false&path=
[1]: https://searchfox.org/mozilla-central/search?q=promiseStopServer
Sorry, that first sentence should end with 'or rely on a helper function to do the same for us'.
Comment on attachment 8960285 [details]
Bug 1447086 - Return a promise from stop() in httpd.js .mielczarek

https://reviewboard.mozilla.org/r/229052/#review235036

This looks sensible. Thanks!
Attachment #8960285 - Flags: review?(ted) → review+
Pushed by tchiovoloni@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7a23c23c732a
Return a promise from stop() in httpd.js r=ted.mielczarek
https://hg.mozilla.org/mozilla-central/rev/7a23c23c732a
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.