-
Notifications
You must be signed in to change notification settings - Fork 8.9k
test: fix testXARollbackWithResourceLock() to ensure ci runs normally #7804
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a CI failure in the testXARollbackWithResourceLock() test that was caused by incomplete synchronization with changes from PR #7708. The test now properly initializes the XA transaction state before testing the rollback operation.
Key Changes:
- Added mock setup for
branchRegisterto handle XA transaction initialization - Added
setAutoCommit(false)call to start the XA transaction and set internal state (xaBranchXidandxaActive) - Added clarifying comments explaining the purpose of the setup
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 2.x #7804 +/- ##
============================================
+ Coverage 69.92% 70.60% +0.67%
- Complexity 992 994 +2
============================================
Files 1322 1322
Lines 50175 50175
Branches 5932 5932
============================================
+ Hits 35086 35426 +340
+ Misses 12156 11811 -345
- Partials 2933 2938 +5 🚀 New features to boost your workflow:
|
funky-eyes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ⅰ. Describe what this PR did
Addressing the CI issue caused by testXARollbackWithResourceLock()
The root cause was a change made in #7708 , but the test pull request wasn't synchronized to the last branch, leading to the problem.
https://github.com/apache/incubator-seata/actions/runs/19563643682/job/56021142515?pr=7781
This has now been fixed.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
mvn clean test
Ⅴ. Special notes for reviews