Closed
Bug 640010
Opened 13 years ago
Closed 13 years ago
mozrunner should be able to tell if its running
Categories
(Testing Graveyard :: Mozmill, defect)
Testing Graveyard
Mozmill
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: k0scist, Assigned: k0scist)
References
Details
(Whiteboard: [mozmill-2.0+])
Attachments
(1 file)
1.96 KB,
patch
|
cmtalbert
:
review+
|
Details | Diff | Splinter Review |
Currently, there is no way to look at a runner object and see if its actually running. This makes stop_runner fairly unreliable. You stop the runner during the test. Are you actually stopped? Do you need to kill it? You're not sure! You should be able to get this information from the runner.
Assignee | ||
Updated•13 years ago
|
Whiteboard: [mozmill-2.0?]
Assignee | ||
Updated•13 years ago
|
Summary: mozrunner should be able to tell if its runnin → mozrunner should be able to tell if its running
This is exactly what bug 640047 is all about for windows. While doing that for windows I'll see about doing that for the other platforms too.
Assignee | ||
Comment 2•13 years ago
|
||
It shouldn't be hard to do for posix, just have to be careful we're doing what we think we're doing. Without this, something like bug 638989 can keep track of whether the browser needs to be restarted or not at the mozmill-level, but if something goes wrong (e.g. you hit a race condition, or the browser doesnt shut down for some reason) it will hang/kill the harness. For posix you can achieve this by seeing if the PID is running and is tied to the correct process. In any case, a method like Runner.is_running() would be very nice
Assignee | ||
Comment 3•13 years ago
|
||
I can stub this out, but bug 668637 makes me really nervous here. We should be really sure our story is solid wrt stopping. If we can robustly stop, this is probably easy. If we can't, this is effectively impossible
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → jhammel
Assignee | ||
Comment 4•13 years ago
|
||
so if everything else is robust, we should be able to have a very simple isRunning method: def isRunning(self): return self.processHandler is not None then if we set self.processHandler to None when we're stopped, we're pretty much done. https://github.com/mozautomation/mozmill/blob/master/mozrunner/mozrunner/runner.py#L240 This relies on everything else working properly in mozprocess, but that's the point of the package anyway
Assignee | ||
Comment 5•13 years ago
|
||
it should be this easy assuming mozprocess is robust underneath
Attachment #544608 -
Flags: review?(ctalbert)
Comment on attachment 544608 [details] [diff] [review] use the process handler as a start/stop marker r+ simple and easy.
Attachment #544608 -
Flags: review?(ctalbert) → review+
Assignee | ||
Comment 7•13 years ago
|
||
pushed to master: https://github.com/mozautomation/mozmill/commit/df9e7a59095c9688c4c6ee30a0677ea8aeb62fce
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•