(self)
| 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 |
nothing calls this directly
no test coverage detected