-
Notifications
You must be signed in to change notification settings - Fork 508
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
update to 2.2.14 #1006
update to 2.2.14 #1006
Conversation
WalkthroughThe pull request updates the Changes
Possibly related PRs
Suggested labels
Tip OpenAI O1 model for chat
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (2)
Files skipped from review due to trivial changes (1)
Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1006 +/- ##
============================================
+ Coverage 78.14% 78.34% +0.19%
- Complexity 872 873 +1
============================================
Files 170 170
Lines 7033 7033
Branches 1037 1037
============================================
+ Hits 5496 5510 +14
+ Misses 1005 992 -13
+ Partials 532 531 -1 ☔ 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.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/springboot/web/ArkTomcatTest.java (1)
43-47
: Test method implementation looks good, but consider renaming the test method.The test method is correctly asserting the expected behavior of the
getWebServer
method. However, the test method name could be more descriptive to indicate the expected behavior being tested.Consider renaming the test method to something like
testGetWebServerReturnsInstanceOfTomcatWebServer
to better describe the expected behavior being tested.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/springboot/web/ArkTomcatServletWebServerFactoryTest.java.bak (1 hunks)
- sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/springboot/web/ArkTomcatTest.java (1 hunks)
Additional comments not posted (2)
sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/springboot/web/ArkTomcatTest.java (1)
27-47
: LGTM!The test class is well-structured and follows the standard test class conventions. The setup and teardown methods are correctly implemented to save and restore the context class loader.
sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/springboot/web/ArkTomcatServletWebServerFactoryTest.java.bak (1)
63-64
: LGTM!The simplification of the
testGetWebServerWithEmbeddedServerServiceNull
test method by removing the complex logic related toRegistryService
andEmbeddedServerService
is a good change. The test now directly asserts the class type of the web server returned byarkTomcatServletWebServerFactory
, which is a more straightforward approach. This change improves the readability and maintainability of the test without affecting its functionality.
b083a7c
to
671d8b8
Compare
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.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/springboot/web/ArkTomcatServletWebServerFactoryTest.java (1)
58-67
: Approved with a suggestion.The changes in the
setUp
method help ensure a clean state for the tests by initializing theArkServiceContainer
, clearing its injector bindings, and setting theArkClient
's injection service to null. This is a valid approach to isolate the test environment.However, using reflection to access private fields and modify the state of the
ArkServiceContainer
andArkClient
classes directly can make the tests fragile and dependent on the internal implementation details of these classes.Consider exploring a more robust approach to manage the state of the
ArkServiceContainer
andArkClient
classes during testing, if possible. This could involve providing public APIs or test helpers to reset the state of these classes without relying on reflection.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/springboot/web/ArkTomcatServletWebServerFactoryTest.java (3 hunks)
Additional comments not posted (3)
sofa-ark-parent/support/ark-springboot-integration/ark-springboot-starter/src/test/java/com/alipay/sofa/ark/springboot/web/ArkTomcatServletWebServerFactoryTest.java (3)
50-50
: LGTM!The
@TestNGOnArkEmbeded
annotation is correctly added to configure the test class to run on an embedded Ark container.
78-79
: LGTM!The simplification of the
testGetWebServerWithEmbeddedServerServiceNull
test method improves the clarity and maintainability of the test code. By removing the complex logic to manage aServiceReference
forEmbeddedServerService
and directly asserting the expected web server class, the test becomes more focused and reduces potential side effects from service management.The changes enhance the effectiveness of the test in verifying the functionality of the
ArkTomcatServletWebServerFactory
.
21-26
: LGTM!The newly added imports for
ArkServiceContainer
,ArkServiceContainerHolder
,TestNGOnArkEmbeded
, andInjector
classes are necessary to support the changes made in thesetUp
method and the addition of the@TestNGOnArkEmbeded
annotation to the test class.The imports are valid and correctly added.
bc2d2e2
to
da02a9e
Compare
Motivation
Explain the context, and why you're making that change.
To make others understand what is the problem you're trying to solve.
Modification
Describe the idea and modifications you've done.
Result
Resolved or fixed #.
If there is no issue then describe the changes introduced by this PR.
Summary by CodeRabbit
New Features
Bug Fixes
Chores