mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
validate: Reduce time waiting for subprocess to stop
stopping the subprocess is done from the main thread, this would throttle starting/stopping any tests by one second. Start with 50ms, and gradually increase the wait between iterations
This commit is contained in:
parent
65e2c1567a
commit
1a95559045
1 changed files with 3 additions and 1 deletions
|
@ -476,6 +476,7 @@ def kill_subprocess(owner, process, timeout):
|
|||
|
||||
stime = time.time()
|
||||
res = process.poll()
|
||||
waittime = 0.05
|
||||
while res is None:
|
||||
try:
|
||||
owner.debug("Subprocess is still alive, sending KILL signal")
|
||||
|
@ -484,7 +485,8 @@ def kill_subprocess(owner, process, timeout):
|
|||
['taskkill', '/F', '/T', '/PID', str(process.pid)])
|
||||
else:
|
||||
process.send_signal(signal.SIGKILL)
|
||||
time.sleep(1)
|
||||
time.sleep(waittime)
|
||||
waittime *= 2
|
||||
except OSError:
|
||||
pass
|
||||
if time.time() - stime > DEFAULT_TIMEOUT:
|
||||
|
|
Loading…
Reference in a new issue