From bd83da04eb12e11cabae019d1ac8fc367969098f Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Fri, 1 Mar 2024 09:31:43 -0500 Subject: [PATCH] chore: add now-required message to LockError Refs: https://github.com/redis/redis-py/issues/3168 Signed-off-by: Mike Fiedler --- tests/unit/search/test_tasks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/search/test_tasks.py b/tests/unit/search/test_tasks.py index 5eecb4a78845..3cb189b4e3ad 100644 --- a/tests/unit/search/test_tasks.py +++ b/tests/unit/search/test_tasks.py @@ -268,7 +268,7 @@ def test_retry_on_lock(self, db_request, monkeypatch): db_request.registry.settings = {"celery.scheduler_url": "redis://redis:6379/0"} - le = redis.exceptions.LockError() + le = redis.exceptions.LockError("Failed to acquire lock") monkeypatch.setattr(SearchLock, "acquire", pretend.raiser(le)) with pytest.raises(celery.exceptions.Retry): @@ -555,7 +555,7 @@ def test_unindex_retry_on_lock(self, db_request, monkeypatch): db_request.registry.settings = {"celery.scheduler_url": "redis://redis:6379/0"} - le = redis.exceptions.LockError() + le = redis.exceptions.LockError("Failed to acquire lock") monkeypatch.setattr(SearchLock, "acquire", pretend.raiser(le)) with pytest.raises(celery.exceptions.Retry): @@ -570,7 +570,7 @@ def test_reindex_retry_on_lock(self, db_request, monkeypatch): db_request.registry.settings = {"celery.scheduler_url": "redis://redis:6379/0"} - le = redis.exceptions.LockError() + le = redis.exceptions.LockError("Failed to acquire lock") monkeypatch.setattr(SearchLock, "acquire", pretend.raiser(le)) with pytest.raises(celery.exceptions.Retry):