-
Notifications
You must be signed in to change notification settings - Fork 8.9k
test: add UT for rm datasource module #7275
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
slievrly
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.
Pls. add license header.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 2.x #7275 +/- ##
============================================
+ Coverage 54.26% 54.33% +0.06%
- Complexity 7267 7280 +13
============================================
Files 1178 1178
Lines 41962 41962
Branches 4923 4923
============================================
+ Hits 22772 22799 +27
+ Misses 17038 17007 -31
- Partials 2152 2156 +4 🚀 New features to boost your workflow:
|
|
Hi @slievrly, I've added the license header as requested. Please take another look when convenient. Thanks! |
slievrly
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
Why
This PR addresses #1714 to improve test coverage for the
seata-rm-datasourcemodule, particularly theorg.apache.seata.rmpackage, which had low method and line coverage.Before:
org.apache.seata.rm: 42% line coverageBaseDataSourceResource: Not explicitly testedAfter:
org.apache.seata.rm: 73% line coverageBaseDataSourceResourceWhat
BaseDataSourceResourceusing:DummyHoldableto simulate holdable resource state.DummyResourceto override abstract methods (e.g.,getConnection).hold(),release(),lookup()Mockitoand followed Seata’s test structure and style.How to Verify
Run:
./mvnw clean test jacoco:report -pl rmThen open the coverage report at:
Note: I have read the contributing guidelines and followed the testing structure and code style.