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>
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')