You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I configure a CircuitBreaker with a delay. I expect to transition from OPEN to HALFOPEN after delay-time given that nothing gets recorded. It does not happen.
Code to observe this behaviour:
publicstaticvoidmain(String[] args) throwsInterruptedException {
finalCircuitBreaker<Object> circuitBreaker =
CircuitBreaker.builder()
.withFailureThreshold(3)
.withSuccessThreshold(3)
.withDelay(Duration.ofMinutes(2))
.build();
// bring to OPEN statecircuitBreaker.recordFailure();
circuitBreaker.recordFailure();
circuitBreaker.recordFailure();
circuitBreaker.recordFailure();
// print state every 10 secondsfor (inti = 0; i < 4 * 6; i++) {
System.out.println(LocalDateTime.now());
System.out.println(circuitBreaker.getState());
System.out.println(circuitBreaker.getRemainingDelay());
Thread.sleep(10_000L);
}
}
Is this intended behaviour?
The text was updated successfully, but these errors were encountered:
I configure a CircuitBreaker with a delay. I expect to transition from OPEN to HALFOPEN after delay-time given that nothing gets recorded. It does not happen.
Code to observe this behaviour:
Is this intended behaviour?
The text was updated successfully, but these errors were encountered: