WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
62615
nrwt: should clean up stale server processes from a previous run
https://bugs.webkit.org/show_bug.cgi?id=62615
Summary
nrwt: should clean up stale server processes from a previous run
Dirk Pranke
Reported
2011-06-13 19:14:03 PDT
nrwt: should clean up stale server processes from a previous run
Attachments
Patch
(11.31 KB, patch)
2011-06-13 19:39 PDT
,
Dirk Pranke
no flags
Details
Formatted Diff
Diff
add better verification that stale processes are being killed per review feedback from tony
(13.32 KB, patch)
2011-06-14 13:12 PDT
,
Dirk Pranke
tony
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Dirk Pranke
Comment 1
2011-06-13 19:39:32 PDT
Created
attachment 97058
[details]
Patch
Tony Chang
Comment 2
2011-06-14 09:54:41 PDT
Comment on
attachment 97058
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=97058&action=review
> Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py:181 > + port._http_server = None > + port.start_http_server()
How do we verify that this worked?
Dirk Pranke
Comment 3
2011-06-14 10:40:10 PDT
Comment on
attachment 97058
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=97058&action=review
>> Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py:181 >> + port.start_http_server() > > How do we verify that this worked?
"working" here is defined as not raising an exception. If the first start() worked, there's a server running. If the second start() gets called, it'll check that it can bind to port 8000, and raise an error if it can't (see lines 170, 171, above for that test). In this case, it thinks the previous server is now stale, and kills it. If I wanted to be more thorough, I could do any of the following things: verify that the first server was in fact killed, verify that a second process was running, or verify that we can connect to the port. None of those seemed strictly necessary given the other tests which ensure that things basically work, but I can add them if you'd prefer.
> Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py:183 > + port.stop_websocket_server()
This, on the other hand, is just a typo, and should be stop_http_server(), instead, obviously.
Tony Chang
Comment 4
2011-06-14 10:52:48 PDT
Comment on
attachment 97058
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=97058&action=review
>>> Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py:181
>> >> How do we verify that this worked? > > "working" here is defined as not raising an exception. If the first start() worked, there's a server running. If the second start() gets called, it'll check that it can bind to port 8000, and raise an error if it can't (see lines 170, 171, above for that test). In this case, it thinks the previous server is now stale, and kills it. > > If I wanted to be more thorough, I could do any of the following things: verify that the first server was in fact killed, verify that a second process was running, or verify that we can connect to the port. None of those seemed strictly necessary given the other tests which ensure that things basically work, but I can add them if you'd prefer.
Verifying that we can connect to the port seems sufficient and not a lot of work.
Dirk Pranke
Comment 5
2011-06-14 13:12:27 PDT
Created
attachment 97160
[details]
add better verification that stale processes are being killed per review feedback from tony
Dirk Pranke
Comment 6
2011-06-14 13:13:24 PDT
(In reply to
comment #4
)
> (From update of
attachment 97058
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=97058&action=review
> > >>> Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py:181 > > >> > >> How do we verify that this worked? > > > > "working" here is defined as not raising an exception. If the first start() worked, there's a server running. If the second start() gets called, it'll check that it can bind to port 8000, and raise an error if it can't (see lines 170, 171, above for that test). In this case, it thinks the previous server is now stale, and kills it. > > > > If I wanted to be more thorough, I could do any of the following things: verify that the first server was in fact killed, verify that a second process was running, or verify that we can connect to the port. None of those seemed strictly necessary given the other tests which ensure that things basically work, but I can add them if you'd prefer. > > Verifying that we can connect to the port seems sufficient and not a lot of work.
Done. I added a check to make sure first process was in fact being killed, and revamped the test slightly to use two ports instead of resetting the state on the existing port.
Dirk Pranke
Comment 7
2011-06-15 19:47:59 PDT
Committed
r88995
: <
http://trac.webkit.org/changeset/88995
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug