Correct timeout to check every so often

This commit is contained in:
Kyle Altendorf
2018-10-04 22:11:02 -04:00
parent 33f0338eeb
commit dcd635ba0c
2 changed files with 16 additions and 1 deletions

View File

@@ -1086,6 +1086,8 @@ class Testdir(object):
else:
end = time.time() + timeout
resolution = min(0.1, timeout / 10)
while True:
ret = popen.poll()
if ret is not None:
@@ -1095,7 +1097,7 @@ class Testdir(object):
if remaining <= 0:
handle_timeout()
time.sleep(remaining * 0.9)
time.sleep(resolution)
finally:
f1.close()
f2.close()