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

test: add unit test for common module #5335

Merged
merged 10 commits into from Feb 13, 2023

Conversation

liuqiufeng
Copy link
Contributor

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

add unit test for
EnhancedServiceLoader,ExtensionDefinition,SizeUtilTest,ReflectionUtil,LowerCaseLinkHashMap,FileLoader,ObjectHolder

io.seata.common.loader.EnhancedServiceLoaderTest#testUnloadByClassAndActivateName需要等EnhancedServiceLoader改造后才能启用

Ⅱ. Does this pull request fix one issue?

fixes #5305

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2023

Codecov Report

Merging #5335 (5fa66b2) into 2.x (51f6a09) will increase coverage by 0.32%.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #5335      +/-   ##
============================================
+ Coverage     48.67%   49.00%   +0.32%     
- Complexity     4259     4307      +48     
============================================
  Files           769      769              
  Lines         27183    27183              
  Branches       3379     3379              
============================================
+ Hits          13232    13320      +88     
+ Misses        12562    12467      -95     
- Partials       1389     1396       +7     
Impacted Files Coverage Δ
...er/src/main/java/io/seata/server/ServerRunner.java 50.00% <0.00%> (-15.39%) ⬇️
.../java/io/seata/server/coordinator/DefaultCore.java 47.30% <0.00%> (-3.60%) ⬇️
...o/seata/server/session/AbstractSessionManager.java 62.31% <0.00%> (-2.90%) ⬇️
...rage/redis/store/RedisTransactionStoreManager.java 76.34% <0.00%> (-0.78%) ⬇️
...in/java/io/seata/server/session/BranchSession.java 78.57% <0.00%> (-0.72%) ⬇️
...in/java/io/seata/server/session/GlobalSession.java 69.92% <0.00%> (-0.38%) ⬇️
...erver/storage/file/session/FileSessionManager.java 49.68% <0.00%> (+0.63%) ⬆️
...va/io/seata/common/loader/ExtensionDefinition.java 45.16% <0.00%> (+6.45%) ⬆️
.../io/seata/common/loader/EnhancedServiceLoader.java 65.08% <0.00%> (+7.75%) ⬆️
...n/src/main/java/io/seata/common/io/FileLoader.java 68.42% <0.00%> (+10.52%) ⬆️
... and 3 more

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

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

LGTM, Pls add change.

@liuqiufeng
Copy link
Contributor Author

LGTM, Pls add change.

done.

@funky-eyes funky-eyes added this to the 2.0.0 milestone Feb 13, 2023
@funky-eyes funky-eyes added module/common common module type: test test case labels Feb 13, 2023
Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

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

LGTM

@funky-eyes funky-eyes merged commit 024ed11 into apache:2.x Feb 13, 2023
@liuqiufeng liuqiufeng deleted the 2.x_unit_test_20230207 branch February 13, 2023 01:46
@slievrly slievrly moved this from To do to Done in Enhance the test coverage Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/common common module type: test test case
Projects
Development

Successfully merging this pull request may close these issues.

[Test] add test for common module
4 participants