Skip to content

Commit

Permalink
tests: increase fudge factors
Browse files Browse the repository at this point in the history
maybe we should just drop these tests.
But let's see if we can make them less flaky.

Signed-off-by: Salvatore Mesoraca <salvatore.mesoraca@aiven.io>
  • Loading branch information
aiven-sal committed Sep 9, 2024
1 parent f520399 commit 08e8f9e
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 08e8f9e

Please sign in to comment.