testing: do not stop waiting if timeout is 0 (issue6541)
Differential Revision: https://phab.mercurial-scm.org/D11102
--- a/mercurial/testing/__init__.py Thu Jul 08 22:04:31 2021 +0200
+++ b/mercurial/testing/__init__.py Sat Jul 17 12:47:07 2021 +0200
@@ -27,7 +27,7 @@
timeout *= _timeout_factor()
start = time.time()
while not os.path.exists(path):
- if time.time() - start > timeout:
+ if timeout and time.time() - start > timeout:
raise RuntimeError(b"timed out waiting for file: %s" % path)
time.sleep(0.01)