Skip to content

Conversation

@NiMv1
Copy link

@NiMv1 NiMv1 commented Dec 25, 2025

What is the purpose of the change

This PR adds comprehensive unit tests for the ConnectionContext class in the
m-datasource module to increase test coverage.

Brief changelog

  • Add ConnectionContextTest.java with 26 unit tests covering:
    • Global transaction state management (inGlobalTransaction, �ind)
    • Branch registration (isBranchRegistered, setBranchId)
    • Undo log management (hasUndoLog, �ppendUndoItem, getUndoItems)
    • Lock key management (hasLockKey, �ppendLockKey, �uildLockKeys)
    • Savepoint operations (�ppendSavepoint,
      emoveSavepoint,
      eleaseSavepoint)
    • State reset operations (
      eset,
      esetWithXid)
    • Auto-commit and global lock flags
  • 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 rm-datasource -Dtest=ConnectionContextTest
\\

Checklist

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

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.

1 participant