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
Use CircuitBreaker.tryRequest() instead of deprecated canRequest() in doc and test #5472
Use CircuitBreaker.tryRequest() instead of deprecated canRequest() in doc and test #5472
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot, @cirusthenter!
I noticed that the canRequest
method is still being used in NonBlockingCircuitBreakerTest
.
Could you please fix that as well?
Thanks for your review. Fixed |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5472 +/- ##
===========================================
+ Coverage 0 74.04% +74.04%
- Complexity 0 20796 +20796
===========================================
Files 0 1801 +1801
Lines 0 76571 +76571
Branches 0 9759 +9759
===========================================
+ Hits 0 56697 +56697
- Misses 0 15261 +15261
- Partials 0 4613 +4613 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for cleaning up!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 👍 👍
Motivation:
Fix docs and tests to use a new method
CircuitBreaker.tryRequest()
instead of deprecatedCircuitBreaker.canRequest()
.Modifications:
site/src/pages/docs/client-circuit-breaker.mdx
to use a new methodCircuitBreaker.tryRequest()
instead of deprecatedCircuitBreaker.canRequest()
.core/src/test/java/com/linecorp/armeria/client/circuitbreaker/NonBlockingCircuitBreakerTest.java
to use a new methodCircuitBreaker.tryRequest()
instead of deprecatedCircuitBreaker.canRequest()
.Result:
CircuitBreaker.tryRequest()
.