mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Unittest - Workaround race condition when killing slow processes
* In some cases the process finishes normally very close to the timeout
This commit is contained in:
parent
6facb140a4
commit
cf5c7abd01
1 changed files with 6 additions and 1 deletions
|
@ -88,7 +88,12 @@ def _get_output(proc, input):
|
|||
|
||||
# If it does take longer than 1 second, abort it
|
||||
if exit is None:
|
||||
try:
|
||||
proc.send_signal(signal.SIGABRT)
|
||||
except OSError as e:
|
||||
# 3 means the process finished/died between last check and now
|
||||
if e.errno != 3:
|
||||
raise
|
||||
exit = wait_process(proc)
|
||||
|
||||
# NOTE Increase this value if tests fail with None being received as
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue