Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

circuitBreakerStrategy never opens #60

Closed
warren-pieterse opened this issue Oct 12, 2023 · 3 comments · Fixed by #61
Closed

circuitBreakerStrategy never opens #60

warren-pieterse opened this issue Oct 12, 2023 · 3 comments · Fixed by #61
Assignees

Comments

@warren-pieterse
Copy link

In the Demo06_WaitAndRetryNestingCircuitBreaker the only message logged is "Strategy logging: ...". the "circuit breaker strategy: break if the action fails at least 4 times in a row" never happens?

Am I missing something?

@martincostello
Copy link
Member

FYI @peter-csala

@peter-csala
Copy link
Contributor

Let me check it. @martincostello Please assign to me

@peter-csala
Copy link
Contributor

peter-csala commented Oct 12, 2023

I've found the issue. :)

The FailureRatio was set to 1.0, that means all requests should fail during the sampling period.
But I've forget to set the SamplingDuration that's why it used the default value which is 30 seconds.

After setting the SamplingDuration to 2 seconds then the CB breaks nicely:

Screenshot 2023-10-12 at 14 20 00

I'll file a PR with a fix shortly.

@peter-csala peter-csala mentioned this issue Oct 12, 2023
@martincostello martincostello linked a pull request Oct 12, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants