Closed
Bug 884421
Opened 11 years ago
Closed 11 years ago
Automatically select port for httpd.js servers
Categories
(Cloud Services :: General, defect)
Cloud Services
General
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla25
People
(Reporter: gps, Assigned: gps)
References
Details
Attachments
(1 file)
274.88 KB,
patch
|
rnewman
:
review+
|
Details | Diff | Splinter Review |
There are a number of tests in /services/ where we start httpd.js servers on hard-coded port numbers. httpd.js supports choosing an available port at run-time. We should make use of this. This will pave the road for parallel execution of xpcshell tests under /services/.
Assignee | ||
Updated•11 years ago
|
Assignee | ||
Comment 2•11 years ago
|
||
I'm actively working on this. This will be my Sync contribution for Q2 :)
Assignee: nobody → gps
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•11 years ago
|
||
I owe you a drink for making you review this. I'd understand if you want to use the FISA court rubber stamp.
Attachment #776044 -
Flags: review?(rnewman)
Comment 4•11 years ago
|
||
Comment on attachment 776044 [details] [diff] [review] Automatic network port selection for tests in /services Review of attachment 776044 [details] [diff] [review]: ----------------------------------------------------------------- Oof. ::: services/common/tests/unit/test_restrequest.js @@ +708,5 @@ > }; > + server.start(); > + let identity = server.identity; > + let uri = identity.primaryScheme + "://" + identity.primaryHost + ":" + > + identity.primaryPort; Sounds like `identity` should have a .baseURI accessor, no? ::: services/common/tests/unit/test_tokenauthenticatedrequest.js @@ +25,5 @@ > let nonce = btoa(CryptoUtils.generateRandomBytes(16)); > let ts = Math.floor(Date.now() / 1000); > let extra = {ts: ts, nonce: nonce}; > > + let sig, auth; Kill these and just `let` on lines 40 and 41. ::: services/sync/tests/unit/test_history_engine.js @@ +30,5 @@ > return this._get(options); > }; > > + let server = sync_httpd_setup({ > + "/1.1/foo/storage/history": collection.handler() Intentional double indent? ::: services/sync/tests/unit/test_syncengine.js @@ +204,3 @@ > } > + > +add_test(() => run_next_test); *raises eyebrows*
Attachment #776044 -
Flags: review?(rnewman) → review+
Assignee | ||
Comment 5•11 years ago
|
||
(In reply to Richard Newman [:rnewman] from comment #4) > ::: services/common/tests/unit/test_restrequest.js > @@ +708,5 @@ > > }; > > + server.start(); > > + let identity = server.identity; > > + let uri = identity.primaryScheme + "://" + identity.primaryHost + ":" + > > + identity.primaryPort; > > Sounds like `identity` should have a .baseURI accessor, no? A saw a bug opened on that somewhere. It isn't ready and I'm lazy :) > > ::: services/common/tests/unit/test_tokenauthenticatedrequest.js > @@ +25,5 @@ > > let nonce = btoa(CryptoUtils.generateRandomBytes(16)); > > let ts = Math.floor(Date.now() / 1000); > > let extra = {ts: ts, nonce: nonce}; > > > > + let sig, auth; > > Kill these and just `let` on lines 40 and 41. auth is used in the closure. But I fixed sig.
Assignee | ||
Comment 6•11 years ago
|
||
https://hg.mozilla.org/services/services-central/rev/45c529ffbe90
Whiteboard: [fixed in services]
Assignee | ||
Comment 7•11 years ago
|
||
This introduced a few new xpcshell failures on services-central. I'll likely fix with a bustage followup.
Assignee | ||
Comment 8•11 years ago
|
||
https://hg.mozilla.org/services/services-central/rev/2264c04671c4
Assignee | ||
Comment 9•11 years ago
|
||
Looks like there is still a failure on Windows. Looking into it now...
Assignee | ||
Comment 10•11 years ago
|
||
3rd time's the charm: https://hg.mozilla.org/services/services-central/rev/75b7cf367efb
Assignee | ||
Comment 11•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/45c529ffbe90 https://hg.mozilla.org/mozilla-central/rev/2264c04671c4 https://hg.mozilla.org/mozilla-central/rev/75b7cf367efb
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Whiteboard: [fixed in services]
Target Milestone: --- → mozilla25
Comment 12•11 years ago
|
||
Backed out for frequent Windows xpcshell failures. https://hg.mozilla.org/integration/mozilla-inbound/rev/ff229738da5c https://tbpl.mozilla.org/php/getParsedLog.php?id=25442339&tree=Mozilla-Inbound https://tbpl.mozilla.org/php/getParsedLog.php?id=25439034&tree=Mozilla-Inbound https://tbpl.mozilla.org/php/getParsedLog.php?id=25443653&tree=Mozilla-Inbound
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla25 → ---
Assignee | ||
Comment 13•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b817406485f8 Merged all 3 patches into 1.
Status: REOPENED → ASSIGNED
Comment 14•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b817406485f8
Status: ASSIGNED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Assignee | ||
Comment 15•11 years ago
|
||
Backout out again for excessive Windows XP failures (likely due to an underlying bug in Necko or httpd.js). See bug 896093. https://hg.mozilla.org/integration/mozilla-inbound/rev/295fcf1d88f6
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 16•11 years ago
|
||
Hopefully fixed the intermittent error, so relanded. https://hg.mozilla.org/integration/mozilla-inbound/rev/d38372fb9dfe
Assignee | ||
Updated•11 years ago
|
Status: REOPENED → ASSIGNED
Comment 17•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d38372fb9dfe
Status: ASSIGNED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Comment 18•11 years ago
|
||
Still a few 8888s. http://pastebin.mozilla.org/2869360
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 19•11 years ago
|
||
Let's handle that in a followup bug, it's less confusing.
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•