Accepting request 1136240 from devel:languages:python

- Add patch to increase timeouts in s390x where tests take longer
  to run:
  * increase-test-timeout.patch

OBS-URL: https://build.opensuse.org/request/show/1136240
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-redis?expand=0&rev=37
This commit is contained in:
Dominique Leuenberger 2024-01-05 21:58:46 +00:00 committed by Git OBS Bridge
commit bdeeb6a122
3 changed files with 36 additions and 2 deletions

View File

@ -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

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Jan 2 11:21:25 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
- 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 <daniel.garcia@suse.com>

View File

@ -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
%patch -P 0 -p1
%endif
# This test passes locally but fails in obs with different
# environment, like ALP build...