Closed narusas closed 5 years ago
Thanks for posting -
Can you clarify for me - Are you 'expecting' there to be an error at the last assert or not? Is it a log message you are expecting to occur? If you set the error on the bean to false (bean.setError(false)), it won't be behave the same way as if you had bean.reset() the breaker.
Last assertion is "NOT" expect throw exception. I want circuitbreaker has turn back normal status.
When I enable debug log, jrugged try to log service status. But making log string, it call canAttempt() and canAttemp change circuitbreaker's isAttempLive status.
Once isAttempLive has chaged, it never rollback status after reset time.
I mean getServiceStatus() change status.(isAttempLive)
I think getServiceStatus() separated to query method and command method.
The head version of jrugged actually doesn't mutate isAttemptLive on that call chain anymore. Can you pull Head and try your test again just to make sure we have actually fixed the issue you are describing here?
Fixed in the release I am about to do.
When some circuit breaker is down, If I enable CircuitBreakerAspect debug log,
CircuitBreakerAspect: line 108 call circuiteBreaker.getStatus() and getServiceStatus(). getServiceStatus() call allowRequest() and allowRequest() call canAttempt() and it change isAttempLive to true and circuitbreaker status broken.
Test Code
Fixture