Skip to content

Commit

Permalink
Merge pull request #88 from valkey-io/aiven-sal/flakytests
Browse files Browse the repository at this point in the history
tests: increase fudge factors
  • Loading branch information
aiven-sal authored Sep 9, 2024
2 parents f520399 + 08e8f9e commit 0941032
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/test_asyncio/test_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ async def test_blocking(self, r):
async def test_blocking_timeout(self, r):
lock1 = self.get_lock(r, "foo")
assert await lock1.acquire(blocking=False)
bt = 0.2
bt = 0.9
sleep = 0.05
lock2 = self.get_lock(r, "foo", sleep=sleep, blocking_timeout=bt)
start = asyncio.get_running_loop().time()
Expand Down
4 changes: 2 additions & 2 deletions tests/test_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def test_blocking_timeout(self, r):
assert lock1.acquire(blocking=False)
bt = 0.4
sleep = 0.05
fudge_factor = 0.1
fudge_factor = 0.5
lock2 = self.get_lock(r, "foo", sleep=sleep, blocking_timeout=bt)
start = time.monotonic()
assert not lock2.acquire()
Expand All @@ -120,7 +120,7 @@ def test_context_manager_blocking_timeout(self, r):
with self.get_lock(r, "foo", blocking=False):
bt = 0.4
sleep = 0.05
fudge_factor = 0.05
fudge_factor = 0.5
lock2 = self.get_lock(r, "foo", sleep=sleep, blocking_timeout=bt)
start = time.monotonic()
assert not lock2.acquire()
Expand Down

0 comments on commit 0941032

Please sign in to comment.