resilience4j-circuit-breaker: add state-transition, slow-call, TimeLimiter, ignoreExceptions and RateLimiter tests on Boot 4.1.2

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b74uRrp2Tiu2PngyuY
This commit is contained in:
2026-11-12 11:00:26 +05:30
co-authored by Claude Sonnet 5.5
parent ae696369ba
commit fe3fc689a6
14 changed files with 520 additions and 7 deletions
@@ -30,6 +30,46 @@ resilience4j:
automaticTransitionFromOpenToHalfOpenEnabled: true
recordExceptions:
- com.ankurm.resilience.FlakyDownstream$DownstreamUnavailableException
# Opens on latency alone: every call succeeds, but 2 of 4 take longer than 200ms.
slowBreaker:
slidingWindowType: COUNT_BASED
slidingWindowSize: 4
minimumNumberOfCalls: 4
failureRateThreshold: 50
slowCallDurationThreshold: 200ms
slowCallRateThreshold: 50
waitDurationInOpenState: 5s
# Sits behind @TimeLimiter: each timeout is one recorded failure.
timeoutBreaker:
slidingWindowType: COUNT_BASED
slidingWindowSize: 4
minimumNumberOfCalls: 4
failureRateThreshold: 50
waitDurationInOpenState: 5s
# Identical pair; the only difference is ignoreExceptions.
lookupCounted:
slidingWindowSize: 4
minimumNumberOfCalls: 4
failureRateThreshold: 50
waitDurationInOpenState: 5s
lookupIgnored:
slidingWindowSize: 4
minimumNumberOfCalls: 4
failureRateThreshold: 50
waitDurationInOpenState: 5s
ignoreExceptions:
- com.ankurm.resilience.r4j.ProductNotFoundException
timelimiter:
instances:
slowLookup:
timeoutDuration: 500ms
cancelRunningFuture: true
ratelimiter:
instances:
searchApi:
limitForPeriod: 3
limitRefreshPeriod: 1s
timeoutDuration: 0
bulkhead:
instances:
slowOp: