changeset 47657:1bad89a67745

testing: do not stop waiting if timeout is 0 (issue6541) Differential Revision: https://phab.mercurial-scm.org/D11102
author Cédric Krier <ced@b2ck.com>
date Sat, 17 Jul 2021 12:47:07 +0200
parents b1b6d0cad455
children f0cf560475a3
files mercurial/testing/__init__.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)