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

Method test_infinite_retry

tests/test_retry.py:172–180  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

170 assert backoff.calls == retries
171
172 def test_infinite_retry(self):
173 backoff = BackoffMock()
174 # specify infinite retries, but give up after 5
175 retry = Retry(backoff, -1)
176 with pytest.raises(ConnectionError):
177 retry.call_with_retry(self._do, self._fail_inf)
178
179 assert self.actual_attempts == 5
180 assert self.actual_failures == 5
181
182
183@pytest.mark.onlynoncluster

Callers

nothing calls this directly

Calls 3

call_with_retryMethod · 0.95
RetryClass · 0.90
BackoffMockClass · 0.70

Tested by

no test coverage detected