File increase-test-timeout.patch of Package python-redis

Index: redis-5.0.1/tests/test_asyncio/test_lock.py
===================================================================
--- redis-5.0.1.orig/tests/test_asyncio/test_lock.py
+++ redis-5.0.1/tests/test_asyncio/test_lock.py
@@ -107,7 +107,7 @@ class TestLock:
     async def test_blocking_timeout(self, r, event_loop):
         lock1 = self.get_lock(r, "foo")
         assert await lock1.acquire(blocking=False)
-        bt = 0.2
+        bt = 0.3
         sleep = 0.05
         lock2 = self.get_lock(r, "foo", sleep=sleep, blocking_timeout=bt)
         start = event_loop.time()
@@ -119,21 +119,21 @@ class TestLock:
     async def test_context_manager(self, r):
         # blocking_timeout prevents a deadlock if the lock can't be acquired
         # for some reason
-        async with self.get_lock(r, "foo", blocking_timeout=0.2) as lock:
+        async with self.get_lock(r, "foo", blocking_timeout=0.3) as lock:
             assert await r.get("foo") == lock.local.token
         assert await r.get("foo") is None
 
     async def test_context_manager_raises_when_locked_not_acquired(self, r):
         await r.set("foo", "bar")
         with pytest.raises(LockError):
-            async with self.get_lock(r, "foo", blocking_timeout=0.1):
+            async with self.get_lock(r, "foo", blocking_timeout=0.2):
                 pass
 
     async def test_high_sleep_small_blocking_timeout(self, r):
         lock1 = self.get_lock(r, "foo")
         assert await lock1.acquire(blocking=False)
         sleep = 60
-        bt = 1
+        bt = 1.2
         lock2 = self.get_lock(r, "foo", sleep=sleep, blocking_timeout=bt)
         start = asyncio.get_running_loop().time()
         assert not await lock2.acquire()
Index: redis-5.0.1/pytest.ini
===================================================================
--- redis-5.0.1.orig/pytest.ini
+++ redis-5.0.1/pytest.ini
@@ -10,4 +10,4 @@ markers =
     replica: replica tests
     experimental: run only experimental tests
 asyncio_mode = auto
-timeout = 30
+timeout = 180
openSUSE Build Service is sponsored by