Skip to content

Conversation

@NiMv1
Copy link

@NiMv1 NiMv1 commented Dec 18, 2025

Closes #6502 - Added unit tests for DBType and RedisKeyConstants to improve test coverage of core module

@xingfudeshi xingfudeshi changed the title Add unit tests for DBType and RedisKeyConstants in core module test:add unit tests for DBType and RedisKeyConstants in core module Dec 19, 2025
@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.14%. Comparing base (340aa3c) to head (935becb).

Additional details and impacted files
@@             Coverage Diff              @@
##                2.x    #7874      +/-   ##
============================================
- Coverage     71.20%   71.14%   -0.06%     
  Complexity      797      797              
============================================
  Files          1300     1300              
  Lines         49620    49620              
  Branches       5874     5874              
============================================
- Hits          35331    35302      -29     
- Misses        11371    11403      +32     
+ Partials       2918     2915       -3     

see 14 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines 20 to 22

import static org.junit.jupiter.api.Assertions.*;

Copy link
Contributor

Choose a reason for hiding this comment

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

Well done, here are a few suggestions: Please do not use wildcards *

Comment on lines 21 to 23
import static org.junit.jupiter.api.Assertions.*;

/**
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Comment on lines 25 to 27
*/
class DBTypeTest {

Copy link
Contributor

Choose a reason for hiding this comment

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

Why is the default access modifier being used here?

@lokidundun
Copy link
Contributor

Please apply mvn spotless:apply

@xingfudeshi xingfudeshi added the module/core core module label Dec 24, 2025
@NiMv1
Copy link
Author

NiMv1 commented Dec 26, 2025

Done! mvn spotless:apply was already applied - no changes needed. The code is already formatted correctly.

@NiMv1
Copy link
Author

NiMv1 commented Dec 26, 2025

Thank you for the review @maple525866! The wildcard imports have been replaced with explicit imports in commit 38060fe. The class uses default (package-private) access modifier because JUnit 5 doesn't require public access for test classes - this is the recommended practice in JUnit 5. However, I've added public modifier for consistency with other test classes in the project.

@maple525866 maple525866 added the module/test test module label Dec 26, 2025
Copy link
Contributor

@maple525866 maple525866 left a comment

Choose a reason for hiding this comment

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

LGTM

@lokidundun
Copy link
Contributor

Please register this PR and your Github ID in change logs.

@NiMv1
Copy link
Author

NiMv1 commented Dec 26, 2025

Done! I've added PR #7874 to the changelog and my GitHub ID (NiMv1) to the contributors list in commit 4b98e7e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module/core core module module/test test module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

task: Improve the test case coverage of [core] module to 70%

4 participants