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

Use CircuitBreaker.tryRequest() instead of deprecated canRequest() in doc and test #5472

Merged
merged 3 commits into from Mar 27, 2024

Conversation

cirusthenter
Copy link
Contributor

@cirusthenter cirusthenter commented Feb 22, 2024

Motivation:

Fix docs and tests to use a new method CircuitBreaker.tryRequest() instead of deprecated CircuitBreaker.canRequest().

Modifications:

  • Fixed a line in site/src/pages/docs/client-circuit-breaker.mdx to use a new method CircuitBreaker.tryRequest() instead of deprecated CircuitBreaker.canRequest().
  • Fixed core/src/test/java/com/linecorp/armeria/client/circuitbreaker/NonBlockingCircuitBreakerTest.java to use a new method CircuitBreaker.tryRequest() instead of deprecated CircuitBreaker.canRequest().

Result:

@CLAassistant
Copy link

CLAassistant commented Feb 22, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@minwoox minwoox left a 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?

@cirusthenter cirusthenter changed the title Fix doc to use CircuitBreaker.tryRequest() instead of deprecated CircuitBreaker.canRequest() Use CircuitBreaker.tryRequest() instead of deprecated canRequest() in doc and test Mar 13, 2024
@cirusthenter
Copy link
Contributor Author

Thanks for your review. Fixed NonBlockingCircuitBreakerTest as well!

Copy link

codecov bot commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.04%. Comparing base (4bfa172) to head (18f0afd).

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.
📢 Have feedback on the report? Share it here.

@ikhoon ikhoon added this to the 1.28.0 milestone Mar 13, 2024
Copy link
Contributor

@ikhoon ikhoon left a 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!

Copy link
Contributor

@jrhee17 jrhee17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍 👍

@jrhee17 jrhee17 merged commit fadd348 into line:main Mar 27, 2024
17 of 18 checks passed
@cirusthenter cirusthenter deleted the fix-docs-about-circuit-breaker-guard branch March 27, 2024 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants