Closed
Bug 987372
Opened 11 years ago
Closed 11 years ago
xpcshell process running httpd sometimes lingers
Categories
(Testing :: Mochitest, defect)
Testing
Mochitest
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla31
People
(Reporter: gps, Assigned: gps)
Details
Attachments
(1 file)
|
9.08 KB,
patch
|
ahal
:
review+
|
Details | Diff | Splinter Review |
If you ctrl+c at the right moment during mochitest test startup, the xpcshell process running the httpd.js server lingers after the runtests.py process goes away. Subsequent test runs will hang due to unable to bind to the hard-coded port 8888.
I wonder if this can cause failures in automation?
| Assignee | ||
Comment 1•11 years ago
|
||
The mochitest runner could start a child process but not clean it up in
all cases. This patch ensures we always try to stop child processes
before exiting.
Ideally, things should probably be implemented as context managers or
the cleanup logic should live in a __del__. But, perfect is the enemy of
done. This simple approach appears to solve the problem in a manner that
isn't too invasive.
I'm not sure how I would go about testing this, so I didn't write a
test. Local testing reveals the new code seems to work.
Attachment #8395959 -
Flags: review?(ahalberstadt)
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → gps
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•11 years ago
|
||
Comment 3•11 years ago
|
||
Comment on attachment 8395959 [details] [diff] [review]
Try harder to stop child processes in mochitest runner
Review of attachment 8395959 [details] [diff] [review]:
-----------------------------------------------------------------
Lgtm, thanks. Yeah, I don't think trying to implement anything "properly" in mochitest is worthwhile at the moment. We are moving towards a world where re-writing it from scratch wouldn't be terribly hard and I've already started thinking about ways to do this (though finding the time is another matter).
Attachment #8395959 -
Flags: review?(ahalberstadt) → review+
| Assignee | ||
Comment 4•11 years ago
|
||
Flags: in-testsuite-
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in
before you can comment on or make changes to this bug.
Description
•