- Notifications
You must be signed in to change notification settings - Fork311
Test | Fix pool reflection in tests#3379
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
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 issues with test failures by correcting the reflection usage to access pool properties in authentication tests.
- Changed reflection binding flags for "AuthenticationContexts" from non-public to public.
- Ensured that tests now correctly access the intended property using the updated API.
Comments suppressed due to low confidence (1)
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/Common/SystemDataInternals/FedAuthTokenHelper.cs:99
- The change from BindingFlags.NonPublic to BindingFlags.Public indicates an adjustment to access a now public member. Please confirm that this update aligns with the overall API design and that any related documentation has been updated accordingly.
IEnumerable authenticationContexts = (IEnumerable)databaseConnectionPoolObj.GetType().GetProperty("AuthenticationContexts", BindingFlags.Public | BindingFlags.Instance).GetValue(databaseConnectionPoolObj, null);
codecovbot commentedMay 27, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@## main #3379 +/- ##==========================================- Coverage 67.04% 64.45% -2.59%========================================== Files 300 298 -2 Lines 65376 65525 +149 ==========================================- Hits 43831 42236 -1595- Misses 21545 23289 +1744
Flags with carried forward coverage won't be shown.Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e980d0c
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Description
My last PR ran as a forked build and so missed some tests that use reflection to access pool properties. This PR corrects the issue and runs as a branch build to ensure full coverage.
Issues
Fixes test failures due to#3352
Testing
Runs full test suite (including branch-build-only tests)
Guidelines
Please review the contribution guidelines before submitting a pull request: