Patchwork [1,of,2] tests: update lockdelay.py to handle the `wait` argument

login
register
mail settings
Submitter Pulkit Goyal
Date Sept. 11, 2020, 7:04 a.m.
Message ID <3095d36efcaf9ce83524.1599807840@workspace>
Download mbox | patch
Permalink /patch/47128/
State Accepted
Headers show

Comments

Pulkit Goyal - Sept. 11, 2020, 7:04 a.m.
# HG changeset patch
# User Pulkit Goyal <7895pulkit@gmail.com>
# Date 1599736900 -19800
#      Thu Sep 10 16:51:40 2020 +0530
# Node ID 3095d36efcaf9ce835249c9312e892b0d54aac78
# Parent  64de86fd0984ff1e2306de52849be7ebf7dcfd25
# EXP-Topic tags-fix
tests: update lockdelay.py to handle the `wait` argument

Spotted by a future change.
Yuya Nishihara - Sept. 12, 2020, 2:23 a.m.
On Fri, 11 Sep 2020 12:34:00 +0530, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit@gmail.com>
> # Date 1599736900 -19800
> #      Thu Sep 10 16:51:40 2020 +0530
> # Node ID 3095d36efcaf9ce835249c9312e892b0d54aac78
> # Parent  64de86fd0984ff1e2306de52849be7ebf7dcfd25
> # EXP-Topic tags-fix
> tests: update lockdelay.py to handle the `wait` argument

Queued this, thanks.

Patch

diff --git a/tests/lockdelay.py b/tests/lockdelay.py
--- a/tests/lockdelay.py
+++ b/tests/lockdelay.py
@@ -10,11 +10,11 @@  import time
 
 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)