-
Notifications
You must be signed in to change notification settings - Fork 317
[6.0] Fix SetProvider to return immediately if user-defined provider found #3652
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
[6.0] Fix SetProvider to return immediately if user-defined provider found #3652
Conversation
…3620) * Fix SetProvider to return immediately if user-defined provider found * Include test * Fix tests * Remove unwanted changes * Update config file name * Rename file back to app.config * Copy always * Disable tests for now. * Fix framework inclusion * Fix test failures * Touch ups * Fix test (continued)
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
Ports the earlier fix to ensure SetProvider does not overwrite a user-defined authentication provider and adds .NET Framework-specific test coverage for configuration-based provider overrides. Key additions include a dummy authentication provider, app.config-based registration for .NET Framework functional tests, and related test adjustments.
- Prevents overwriting an existing user-defined provider by returning early in SetProvider.
- Adds dummy provider + app.config to validate provider override behavior on .NET Framework.
- Introduces new tests and conditional compilation for framework-specific behavior.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.cs | Adds early return to protect user-defined providers and a new (incomplete) doc comment. |
src/Microsoft.Data.SqlClient/tests/FunctionalTests/app.config | Registers dummy authentication provider for .NET Framework tests. |
src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj | Ensures app.config is copied for netfx and includes dummy provider source. |
src/Microsoft.Data.SqlClient/tests/FunctionalTests/DataCommon/DummySqlAuthenticationProvider.cs | Adds dummy provider used to validate configuration-based registration. |
src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlAuthenticationProviderTest.cs | Adjusts default provider test and adds .NET Framework–specific override test. |
src/Microsoft.Data.SqlClient/tests/FunctionalTests/AADAuthenticationTests.cs | Adds test validating dummy provider registration via config. |
src/Microsoft.Data.SqlClient/tests/FunctionalTests/DataCommon/DummySqlAuthenticationProvider.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/FunctionalTests/AADAuthenticationTests.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlAuthenticationProviderManager.cs
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/6.0 #3652 +/- ##
===============================================
+ Coverage 72.73% 75.61% +2.87%
===============================================
Files 285 244 -41
Lines 59162 40214 -18948
===============================================
- Hits 43034 30409 -12625
+ Misses 16128 9805 -6323
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:
|
Ports #3620 to release/6.0