tests: update lockdelay.py to handle the `wait` argument
authorPulkit Goyal <7895pulkit@gmail.com>
Thu, 10 Sep 2020 16:51:40 +0530
changeset 45444 f6c67bb4ca03
parent 45443 037e88d453fa
child 45445 766797f23f77
tests: update lockdelay.py to handle the `wait` argument Spotted by a future change.
tests/lockdelay.py
--- a/tests/lockdelay.py	Thu Sep 03 14:14:04 2020 +0530
+++ b/tests/lockdelay.py	Thu Sep 10 16:51:40 2020 +0530
@@ -10,11 +10,11 @@
 
 def reposetup(ui, repo):
     class delayedlockrepo(repo.__class__):
-        def lock(self):
+        def lock(self, wait=True):
             delay = float(os.environ.get('HGPRELOCKDELAY', '0.0'))
             if delay:
                 time.sleep(delay)
-            res = super(delayedlockrepo, self).lock()
+            res = super(delayedlockrepo, self).lock(wait=wait)
             delay = float(os.environ.get('HGPOSTLOCKDELAY', '0.0'))
             if delay:
                 time.sleep(delay)