Closed
Bug 742794
Opened 13 years ago
Closed 12 years ago
Client should abort if told to start gecko instance on a used host/port
Categories
(Remote Protocol :: Marionette, defect)
Tracking
(firefox20 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 fixed)
RESOLVED
FIXED
mozilla20
People
(Reporter: mdas, Assigned: mihneadb)
References
Details
(Whiteboard: [good first bug][mentor=mdas][lang=python])
Attachments
(1 file, 1 obsolete file)
2.00 KB,
patch
|
mdas
:
review+
|
Details | Diff | Splinter Review |
Right now, if the client is told to start a b2g instance on a used host/port combination, it will kick off the process. It should first detect that this is unused, and if it is free, it should then start the process. Otherwise, it should throw an error
Reporter | ||
Updated•12 years ago
|
Whiteboard: [good first bug][mentor=mdas][lang=python]
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → mihneadb
Assignee | ||
Comment 1•12 years ago
|
||
As discussed on IRC, I've only added the check before starting the Gecko instance.
Attachment #692003 -
Flags: review?(mdas)
Reporter | ||
Comment 2•12 years ago
|
||
Comment on attachment 692003 [details] [diff] [review]
check for available port
Review of attachment 692003 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks for the patch, I'll r+ once we get the Exception change through.
::: testing/marionette/client/marionette/marionette.py
@@ +119,5 @@
> if bin:
> + port = int(self.port)
> + if not Marionette.is_port_available(port, host=self.host):
> + print >> sys.stderr, "%s:%d is unavailable." % (self.host, port)
> + sys.exit(1)
This style on lines 122-123 is a bit odd. Here, I'd throw an Exception instead of print/exit, since it will by default print to stderr and set the exit code to 1, and anyone using the Marionette object can catch that exception if they want.
@@ +171,5 @@
> + return True
> + except socket.error:
> + return False
> + finally:
> + s.close()
Ah, helpful!
Attachment #692003 -
Flags: review?(mdas) → review-
Assignee | ||
Comment 3•12 years ago
|
||
There :)
Attachment #692003 -
Attachment is obsolete: true
Attachment #692305 -
Flags: review?(mdas)
Reporter | ||
Comment 4•12 years ago
|
||
Comment on attachment 692305 [details] [diff] [review]
raise MarionetteException when the port is unavailable
Review of attachment 692305 [details] [diff] [review]:
-----------------------------------------------------------------
yay!
Attachment #692305 -
Flags: review?(mdas) → review+
Reporter | ||
Updated•12 years ago
|
Summary: Client should abort if told to start b2g instance on a used host/port → Client should abort if told to start gecko instance on a used host/port
Reporter | ||
Comment 5•12 years ago
|
||
landed on inbound:
https://hg.mozilla.org/integration/mozilla-inbound/rev/95d84732129
Comment 6•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Reporter | ||
Comment 7•12 years ago
|
||
status-b2g18:
--- → fixed
Comment 8•12 years ago
|
||
Updated•2 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•