MCPcopy
hub / github.com/redis/redis-py / test_infinite_retry

Method test_infinite_retry

tests/test_asyncio/test_retry.py:110–118  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

108
109 @pytest.mark.asyncio
110 async def test_infinite_retry(self):
111 backoff = BackoffMock()
112 # specify infinite retries, but give up after 5
113 retry = Retry(backoff, -1)
114 with pytest.raises(ConnectionError):
115 await retry.call_with_retry(self._do, self._fail_inf)
116
117 assert self.actual_attempts == 5
118 assert self.actual_failures == 5
119
120
121class TestRedisClientRetry:

Callers

nothing calls this directly

Calls 3

call_with_retryMethod · 0.95
RetryClass · 0.90
BackoffMockClass · 0.70

Tested by

no test coverage detected