tests: Try to work around race condition.
This commit is contained in:
parent
8fdbd94d71
commit
4b770f4f35
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
|
import time
|
||||||
import logging
|
import logging
|
||||||
import signal
|
import signal
|
||||||
|
|
||||||
@ -194,6 +195,9 @@ def test_killed_command(qtbot, tmpdir, py_proc, runner):
|
|||||||
timeout=10000):
|
timeout=10000):
|
||||||
runner.run(cmd, *args, env=env)
|
runner.run(cmd, *args, env=env)
|
||||||
|
|
||||||
|
# Make sure the PID was written to the file, not just the file created
|
||||||
|
time.sleep(0.5)
|
||||||
|
|
||||||
with qtbot.waitSignal(runner.finished, raising=True):
|
with qtbot.waitSignal(runner.finished, raising=True):
|
||||||
os.kill(int(pidfile.read()), signal.SIGTERM)
|
os.kill(int(pidfile.read()), signal.SIGTERM)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user