cli: make startstop_node wait 20 seconds instead of 5 for a process to go away after we signalled it to go away
Because the unit tests on the VirtualZooko buildslave failed when it took 16 seconds for a process to go away. Perhaps getting notification after only 5 seconds instead of 20 seconds is desirable, and we should change the unit tests and set this back to 5, but I don't know exactly how to change the unit tests. Perhaps match this particular warning message about the shutdown taking a while and allow the code under test to pass if the only stderr that it emits is this warning.
This commit is contained in:
parent
169c695801
commit
8d83699783
|
@ -105,7 +105,7 @@ def do_stop(basedir, out=sys.stdout, err=sys.stderr):
|
||||||
pid = int(pid)
|
pid = int(pid)
|
||||||
|
|
||||||
# kill it hard (SIGKILL), delete the twistd.pid file, then wait for the
|
# kill it hard (SIGKILL), delete the twistd.pid file, then wait for the
|
||||||
# process itself to go away. If it hasn't gone away after 5 seconds, warn
|
# process itself to go away. If it hasn't gone away after 20 seconds, warn
|
||||||
# the user but keep waiting until they give up.
|
# the user but keep waiting until they give up.
|
||||||
try:
|
try:
|
||||||
os.kill(pid, signal.SIGKILL)
|
os.kill(pid, signal.SIGKILL)
|
||||||
|
@ -123,7 +123,7 @@ def do_stop(basedir, out=sys.stdout, err=sys.stderr):
|
||||||
pass
|
pass
|
||||||
start = time.time()
|
start = time.time()
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
wait = 5
|
wait = 20
|
||||||
first_time = True
|
first_time = True
|
||||||
while True:
|
while True:
|
||||||
# poll once per second until we see the process is no longer running
|
# poll once per second until we see the process is no longer running
|
||||||
|
|
Loading…
Reference in New Issue