testing: do not stop waiting if timeout is 0 (issue6541)
authorCédric Krier <ced@b2ck.com>
Sat, 17 Jul 2021 12:47:07 +0200
changeset 47657 1bad89a67745
parent 47656 b1b6d0cad455
child 47658 f0cf560475a3
testing: do not stop waiting if timeout is 0 (issue6541) Differential Revision: https://phab.mercurial-scm.org/D11102
mercurial/testing/__init__.py
--- 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)