Hey matt,
Thanks for the example. I investigated some more on my side and I think the reason why I thought it wasn't open was because the command was indeed failing, but I have a fallback which does some things on failure and then I use a function like this to figure out the failure reason for my logs:
private String getFallbackReason() {
String reason = "Unknown";
if (isCircuitBreakerOpen()) {
reason = "Circuit Breaker Open";
} else if (isResponseRejected()) {
reason = "Response rejected";
} else if (isResponseTimedOut()) {
reason = "Response timed-out";
When I run my test, isCircuitBreakerOpen ends up being false. So I get Unknown for the failure reason. I attached my debugger and I found that isCircuiteBreakerOpen is indeed returning false, but isResponseShortCircuited() is returning true.
Should I expected isCircuitBreakerOpen to return false in this scenario? Does your test case show the same thing?
Or should I be relying on isResponseShortCircuited() to get the "failure type"?
Appreciate our help.
Thanks,
JD