Patchwork D11102: testing: do not stop waiting if timeout is 0 (issue6541)

login
register
mail settings
Submitter phabricator
Date July 17, 2021, 10:48 a.m.
Message ID <differential-rev-PHID-DREV-3ccj7j6p3rwxusdek5jp-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49416/
State Superseded
Headers show

Comments

phabricator - July 17, 2021, 10:48 a.m.
ced created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11102

AFFECTED FILES
  mercurial/testing/__init__.py

CHANGE DETAILS




To: ced, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/testing/__init__.py b/mercurial/testing/__init__.py
--- a/mercurial/testing/__init__.py
+++ b/mercurial/testing/__init__.py
@@ -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)