tests: increase the timeout for the subprocess to receive the quit signal

On a very loaded machine, the process might not receive the quit signal
in a timely manner, and this introduce false positive results.

Add a longer timeout. This shouldn't interfere with the global time
spent in the tests, but will allow some loaded environment to pass
the tests.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
Benjamin Tissoires 2019-08-07 12:11:30 +02:00
parent 1e98b7e843
commit 576bc2e5e6

View file

@ -43,7 +43,7 @@ def run_command(args):
p.wait(0.7)
except subprocess.TimeoutExpired:
p.send_signal(3) # SIGQUIT
stdout, stderr = p.communicate(timeout=2)
stdout, stderr = p.communicate(timeout=5)
if p.returncode == -3:
p.returncode = 0
return p.returncode, stdout.decode('UTF-8'), stderr.decode('UTF-8')