-
Notifications
You must be signed in to change notification settings - Fork 317
test: improve test coverage for pkg/datasource #973
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
base: master
Are you sure you want to change the base?
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 adds comprehensive test coverage for the datasource initialization functionality. The Init function registers SQL drivers for Seata's AT and XA transaction modes.
- Adds test file
pkg/datasource/init_test.gowith 23 test functions and 4 benchmark functions - Implements thread-safe test initialization using
sync.Onceto handle non-idempotentInit()function - Tests driver registration, persistence, concurrency, and uniqueness
💡 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 @@
## master #973 +/- ##
=======================================
Coverage 48.49% 48.50%
=======================================
Files 199 200 +1
Lines 12329 12331 +2
=======================================
+ Hits 5979 5981 +2
Misses 5880 5880
Partials 470 470 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
@everfid-ever There are no new cover lines.
Which issue(s) this PR fixes:
Fixes #933