Skip to content

Conversation

@NiMv1
Copy link

@NiMv1 NiMv1 commented Dec 25, 2025

What is the purpose of the change

This PR adds unit tests for the core module to improve test coverage, addressing issue #6502.

Brief changelog

  • Add LockStatusTest.java with tests for:

    • getCode() method
    • get(byte) and get(int) methods
    • Invalid code exception handling
    • Enum values validation
  • Add MessageTypeTest.java with tests for:

    • Version and type constants
    • Global transaction type constants
    • Branch transaction type constants
    • Merge and registration type constants
  • Add ProtocolConstantsTest.java with tests for:

    • Magic code bytes
    • Version constants
    • Frame length and head length
    • Message type constants
    • Configured codec and compressor validation
  • Update changes/en-us/2.x.md with changelog entry

  • Add contributor to the list

Verifying this change

This change is a test-only change and can be verified by running:
\\�ash
mvn test -pl core -Dtest=LockStatusTest,MessageTypeTest,ProtocolConstantsTest
\\

Checklist

  • Make sure that the change is in accordance with the contributing guide
  • Add unit tests for the change
  • Update the changelog

Closes #6502 (partial)

@codecov
Copy link

codecov bot commented Dec 26, 2025

Codecov Report

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

Additional details and impacted files
@@             Coverage Diff              @@
##                2.x    #7901      +/-   ##
============================================
- Coverage     71.20%   71.14%   -0.06%     
  Complexity      797      797              
============================================
  Files          1300     1300              
  Lines         49620    49620              
  Branches       5874     5874              
============================================
- Hits          35331    35304      -27     
- Misses        11371    11401      +30     
+ Partials       2918     2915       -3     

see 8 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.

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.

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

1 participant