Closed
Bug 887557
Opened 11 years ago
Closed 11 years ago
use a dynamic port in dom xpcshell tests so they can be run in parallel
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: mihneadb, Assigned: mihneadb)
References
Details
Attachments
(1 file, 3 obsolete files)
3.68 KB,
patch
|
mihneadb
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Updated•11 years ago
|
Assignee | ||
Comment 1•11 years ago
|
||
Assignee: nobody → mihneadb
Assignee | ||
Comment 2•11 years ago
|
||
changing to server.identity.primaryPort
Attachment #768053 -
Attachment is obsolete: true
Assignee | ||
Comment 3•11 years ago
|
||
Comment on attachment 768998 [details] [diff] [review]
use -1 as httpd port
Not sure about the *_wrap test, that URL isn't used at all, maybe I should remove it?
Attachment #768998 -
Flags: feedback?(ted)
Comment 4•11 years ago
|
||
The URL is being used in the _wrap test; we can't set prefs in content processes, and we run test_geolocation_timeout.js in the content process.
Assignee | ||
Comment 5•11 years ago
|
||
I'm not sure I follow. What would be the correct way of fixing that test?
Comment 6•11 years ago
|
||
Start the server in the chrome process in the _wrap test, where you can obtain the dynamic port number. There will be duplicated code, but so it goes.
Comment 7•11 years ago
|
||
Comment on attachment 768998 [details] [diff] [review]
use -1 as httpd port
Review of attachment 768998 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/tests/unit/test_geolocation_provider.js
@@ +74,4 @@
>
> var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
> + prefs.setCharPref("geo.wifi.uri", "http://localhost:" +
> + httpserver.identity.primaryPort + "/geo");
I wonder if we should add a convenience method to httpd.js to get a URL out of it with the port in use, like we did for mozhttpd:
http://mozbase.readthedocs.org/en/latest/mozhttpd.html#mozhttpd.MozHttpd.get_url
::: dom/tests/unit/test_geolocation_timeout_wrap.js
@@ +5,5 @@
> var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
> prefs.setBoolPref("geo.wifi.scan", false);
> + prefs.setCharPref("geo.wifi.uri", "http://localhost:4444/geo");
> + // ^^^ needs the port in the test_geolocation_timeout.js that's being set
> + // dynamically; it gets re-set in there so it is fine for now
So jdm is saying that you should start a server here, and put the server-starting logic in test_geolocation_timeout.js inside the processType check so that you only start a server when it's not being run as a child process.
Attachment #768998 -
Flags: feedback?(ted)
Assignee | ||
Comment 8•11 years ago
|
||
Attachment #772812 -
Flags: review?(josh)
Assignee | ||
Updated•11 years ago
|
Attachment #768998 -
Attachment is obsolete: true
Comment 9•11 years ago
|
||
Comment on attachment 772812 [details] [diff] [review]
use a dynamic port for httpd.js
Review of attachment 772812 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/tests/unit/test_geolocation_timeout_wrap.js
@@ +7,5 @@
> function run_test() {
> var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
> prefs.setBoolPref("geo.wifi.scan", false);
> +
> + var httpserver = new HttpServer();
Make this a global.
Attachment #772812 -
Flags: review?(josh) → review+
Assignee | ||
Comment 10•11 years ago
|
||
Assignee | ||
Comment 11•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #772812 -
Attachment is obsolete: true
Assignee | ||
Comment 12•11 years ago
|
||
Comment on attachment 773051 [details] [diff] [review]
use a dynamic port for httpd.js
keeping r+
Attachment #773051 -
Flags: review+
Assignee | ||
Comment 13•11 years ago
|
||
Isolated (this patch only) try run here: https://tbpl.mozilla.org/?tree=Try&rev=ec7816140100
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 14•11 years ago
|
||
Keywords: checkin-needed
Comment 15•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•