Skip to content

Commit

Permalink
chore: add now-required message to LockError
Browse files Browse the repository at this point in the history
Refs: redis/redis-py#3168

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
  • Loading branch information
miketheman committed Mar 1, 2024
1 parent 7b0c29b commit bd83da0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/unit/search/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand All @@ -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):
Expand Down

0 comments on commit bd83da0

Please sign in to comment.