Skip to content

Commit bd83da0

Browse files
committed
chore: add now-required message to LockError
Refs: redis/redis-py#3168 Signed-off-by: Mike Fiedler <[email protected]>
1 parent 7b0c29b commit bd83da0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/unit/search/test_tasks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def test_retry_on_lock(self, db_request, monkeypatch):
268268

269269
db_request.registry.settings = {"celery.scheduler_url": "redis://redis:6379/0"}
270270

271-
le = redis.exceptions.LockError()
271+
le = redis.exceptions.LockError("Failed to acquire lock")
272272
monkeypatch.setattr(SearchLock, "acquire", pretend.raiser(le))
273273

274274
with pytest.raises(celery.exceptions.Retry):
@@ -555,7 +555,7 @@ def test_unindex_retry_on_lock(self, db_request, monkeypatch):
555555

556556
db_request.registry.settings = {"celery.scheduler_url": "redis://redis:6379/0"}
557557

558-
le = redis.exceptions.LockError()
558+
le = redis.exceptions.LockError("Failed to acquire lock")
559559
monkeypatch.setattr(SearchLock, "acquire", pretend.raiser(le))
560560

561561
with pytest.raises(celery.exceptions.Retry):
@@ -570,7 +570,7 @@ def test_reindex_retry_on_lock(self, db_request, monkeypatch):
570570

571571
db_request.registry.settings = {"celery.scheduler_url": "redis://redis:6379/0"}
572572

573-
le = redis.exceptions.LockError()
573+
le = redis.exceptions.LockError("Failed to acquire lock")
574574
monkeypatch.setattr(SearchLock, "acquire", pretend.raiser(le))
575575

576576
with pytest.raises(celery.exceptions.Retry):

0 commit comments

Comments
 (0)