Skip to content

Commit 08e8f9e

Browse files
committed
tests: increase fudge factors
maybe we should just drop these tests. But let's see if we can make them less flaky. Signed-off-by: Salvatore Mesoraca <[email protected]>
1 parent f520399 commit 08e8f9e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/test_asyncio/test_lock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ async def test_blocking(self, r):
107107
async def test_blocking_timeout(self, r):
108108
lock1 = self.get_lock(r, "foo")
109109
assert await lock1.acquire(blocking=False)
110-
bt = 0.2
110+
bt = 0.9
111111
sleep = 0.05
112112
lock2 = self.get_lock(r, "foo", sleep=sleep, blocking_timeout=bt)
113113
start = asyncio.get_running_loop().time()

tests/test_lock.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def test_blocking_timeout(self, r):
101101
assert lock1.acquire(blocking=False)
102102
bt = 0.4
103103
sleep = 0.05
104-
fudge_factor = 0.1
104+
fudge_factor = 0.5
105105
lock2 = self.get_lock(r, "foo", sleep=sleep, blocking_timeout=bt)
106106
start = time.monotonic()
107107
assert not lock2.acquire()
@@ -120,7 +120,7 @@ def test_context_manager_blocking_timeout(self, r):
120120
with self.get_lock(r, "foo", blocking=False):
121121
bt = 0.4
122122
sleep = 0.05
123-
fudge_factor = 0.05
123+
fudge_factor = 0.5
124124
lock2 = self.get_lock(r, "foo", sleep=sleep, blocking_timeout=bt)
125125
start = time.monotonic()
126126
assert not lock2.acquire()

0 commit comments

Comments
 (0)