We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5932dbf commit eb6cc52Copy full SHA for eb6cc52
1 file changed
tests/unit/test_resilience.py
@@ -253,6 +253,9 @@ def test_reopens_on_failure_in_half_open(self):
253
time.sleep(0.02)
254
assert cb.state == CircuitState.HALF_OPEN
255
256
+ # Use a longer timeout before recording failure so circuit stays OPEN
257
+ # long enough to assert (the short 10ms timeout causes race conditions)
258
+ cb._config = CircuitBreakerConfig(failure_threshold=1, timeout_seconds=10.0)
259
cb.record_failure()
260
assert cb.state == CircuitState.OPEN
261
0 commit comments