diff --git a/increase-test-timeout.patch b/increase-test-timeout.patch new file mode 100644 index 0000000..c7a5c96 --- /dev/null +++ b/increase-test-timeout.patch @@ -0,0 +1,23 @@ +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() +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 = 40 diff --git a/python-redis.changes b/python-redis.changes index 034f87d..6f619a2 100644 --- a/python-redis.changes +++ b/python-redis.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jan 2 11:21:25 UTC 2024 - Antonio Larrosa + +- Add patch to increase timeouts in s390x where tests take longer + to run: + * increase-test-timeout.patch + ------------------------------------------------------------------- Mon Oct 30 13:09:20 UTC 2023 - Daniel Garcia diff --git a/python-redis.spec b/python-redis.spec index 640e39e..feb9608 100644 --- a/python-redis.spec +++ b/python-redis.spec @@ -1,7 +1,7 @@ # # spec file for package python-redis # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,6 +27,7 @@ License: MIT URL: https://github.com/redis/redis-py Source0: https://files.pythonhosted.org/packages/source/r/redis/redis-%{version}.tar.gz Source1: https://raw.githubusercontent.com/redis/redis-py/5.0/pytest.ini +Patch0: increase-test-timeout.patch BuildRequires: %{python_module async-timeout >= 4.0.2} BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module packaging} @@ -50,9 +51,12 @@ BuildArch: noarch The Python interface to the Redis key-value store. %prep -%autosetup -p1 -n redis-%{version} +%autosetup -N -n redis-%{version} # pytest.ini for pytest markers cp %SOURCE1 . +%ifarch s390x +%patch0 -p1 +%endif # This test passes locally but fails in obs with different # environment, like ALP build...