Closed
Bug 889034
Opened 11 years ago
Closed 11 years ago
use a dynamic port in places/ xpcshell tests so they can be run in parallel
Categories
(Toolkit :: Places, defect)
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: mihneadb, Assigned: mihneadb)
References
Details
Attachments
(1 file, 1 obsolete file)
2.01 KB,
patch
|
mihneadb
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Updated•11 years ago
|
Attachment #769796 -
Flags: review?(mak77)
Comment 2•11 years ago
|
||
Comment on attachment 769796 [details] [diff] [review] use -1 as httpd port Review of attachment 769796 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/components/places/tests/network/test_history_redirects.js @@ +28,5 @@ > +}); > + > +XPCOMUtils.defineLazyGetter(this, "FOUND_URL", function() { > + return "http://localhost:" + PORT + FOUND_PATH; > +}); these don't need to be lazy getters, why not just define const? const PORT = HTTPSVR.identity.primaryPort; const PERMA_REDIR_URL = "http://localhost:" + PORT + PERMA_REDIR_PATH; and so on... @@ +77,5 @@ > > var chan = NetUtil.ioService > + .newChannelFromURI(uri("http://localhost:" + > + HTTPSVR.identity.primaryPort + > + "/permaredir")); this is just .newChannelFromURI(uri(PERMA_REDIR_URL));
Attachment #769796 -
Flags: review?(mak77) → review+
Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Marco Bonardo [:mak] from comment #2) > Comment on attachment 769796 [details] [diff] [review] > use -1 as httpd port > > Review of attachment 769796 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: toolkit/components/places/tests/network/test_history_redirects.js > @@ +28,5 @@ > > +}); > > + > > +XPCOMUtils.defineLazyGetter(this, "FOUND_URL", function() { > > + return "http://localhost:" + PORT + FOUND_PATH; > > +}); > > these don't need to be lazy getters, why not just define const? > > const PORT = HTTPSVR.identity.primaryPort; > const PERMA_REDIR_URL = "http://localhost:" + PORT + PERMA_REDIR_PATH; > > and so on... They have to be lazy getters because the server is not started at that time. If you want I could take out the start call from the run_test function and put it at the top of the file and then I can do what you suggested. Is that ok? > > @@ +77,5 @@ > > > > var chan = NetUtil.ioService > > + .newChannelFromURI(uri("http://localhost:" + > > + HTTPSVR.identity.primaryPort + > > + "/permaredir")); > > this is just .newChannelFromURI(uri(PERMA_REDIR_URL)); Right, thanks!
Comment 4•11 years ago
|
||
(In reply to Mihnea Dobrescu-Balaur (:mihneadb) from comment #3) > (In reply to Marco Bonardo [:mak] from comment #2) > > Comment on attachment 769796 [details] [diff] [review] > > use -1 as httpd port > > > > Review of attachment 769796 [details] [diff] [review]: > > ----------------------------------------------------------------- > > > > ::: toolkit/components/places/tests/network/test_history_redirects.js > > @@ +28,5 @@ > > > +}); > > > + > > > +XPCOMUtils.defineLazyGetter(this, "FOUND_URL", function() { > > > + return "http://localhost:" + PORT + FOUND_PATH; > > > +}); > > > > these don't need to be lazy getters, why not just define const? > > > > const PORT = HTTPSVR.identity.primaryPort; > > const PERMA_REDIR_URL = "http://localhost:" + PORT + PERMA_REDIR_PATH; > > > > and so on... > > They have to be lazy getters because the server is not started at that time. > If you want I could take out the start call from the run_test function and > put it at the top of the file and then I can do what you suggested. Is that > ok? well, we start the server immediately regardless, so I think it's ok if you do that.
Assignee | ||
Comment 5•11 years ago
|
||
Assignee | ||
Comment 6•11 years ago
|
||
Comment on attachment 773702 [details] [diff] [review] use a dynamic port keeping prev r+
Attachment #773702 -
Flags: review+
Assignee | ||
Updated•11 years ago
|
Attachment #769796 -
Attachment is obsolete: true
Assignee | ||
Comment 7•11 years ago
|
||
here's the try run https://tbpl.mozilla.org/?tree=Try&rev=93ea699403ed
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 8•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/d19b8311599b
Flags: in-testsuite-
Keywords: checkin-needed
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d19b8311599b
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in
before you can comment on or make changes to this bug.
Description
•