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

[Enhance] add some unit tests and some integration tests for address module #8643

Merged

Conversation

onewe
Copy link
Collaborator

@onewe onewe commented Jun 28, 2022

  • add spring-boot-starter-test dependency
  • use constructor injection instead of field injection

Please do not create a Pull Request without creating an issue first.

What is the purpose of the change

XXXXX

Brief changelog

XX

Verifying this change

XXXX

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • Run mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.

…module

- add spring-boot-starter-test dependency
- use constructor injection instead of field injection
@onewe onewe force-pushed the enhance/add_unit_test_for_address_module branch from 5931851 to 8122a2e Compare June 28, 2022 07:24
@codecov-commenter
Copy link

Codecov Report

Merging #8643 (e46e729) into develop (7aa74b9) will increase coverage by 0.36%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #8643      +/-   ##
=============================================
+ Coverage      41.57%   41.93%   +0.36%     
- Complexity      4458     4512      +54     
=============================================
  Files            882      884       +2     
  Lines          32127    32252     +125     
  Branches        3721     3733      +12     
=============================================
+ Hits           13357    13526     +169     
+ Misses         17416    17370      -46     
- Partials        1354     1356       +2     
Impacted Files Coverage Δ
...ess/controller/AddressServerClusterController.java 100.00% <100.00%> (+100.00%) ⬆️
...nacos/address/controller/ServerListController.java 100.00% <100.00%> (+100.00%) ⬆️
...ba/nacos/naming/core/v2/client/AbstractClient.java 43.54% <0.00%> (-19.25%) ⬇️
...nacos/common/remote/client/grpc/GrpcSdkClient.java 50.00% <0.00%> (-16.67%) ⬇️
...s/common/remote/client/grpc/GrpcClusterClient.java 50.00% <0.00%> (-16.67%) ⬇️
...aba/nacos/naming/core/v2/index/ServiceStorage.java 51.66% <0.00%> (-15.73%) ⬇️
...os/client/auth/ram/identify/CredentialService.java 78.84% <0.00%> (-3.85%) ⬇️
...ephemeral/distro/v2/DistroClientDataProcessor.java 9.28% <0.00%> (-1.83%) ⬇️
...m/alibaba/nacos/core/remote/ConnectionManager.java 44.37% <0.00%> (-1.48%) ⬇️
.../alibaba/nacos/core/remote/grpc/GrpcSdkServer.java 100.00% <0.00%> (ø)
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7aa74b9...e46e729. Read the comment docs.

Copy link
Contributor

@pixystone pixystone left a comment

Choose a reason for hiding this comment

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

LGTM

@KomachiSion KomachiSion merged commit 3124f0a into alibaba:develop Jul 7, 2022
@onewe onewe deleted the enhance/add_unit_test_for_address_module branch July 7, 2022 04:07
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 this pull request may close these issues.

4 participants