Disable incompatible tests on managed instance#3678
Merged
Conversation
paulmedynski
approved these changes
Oct 10, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR disables tests that are incompatible with Azure SQL Managed Instance testing due to unsupported features and missing permissions. The changes ensure tests only run on environments where the required capabilities are available.
Key changes:
- Adds a new utility method
IsNotManagedInstance()to detect managed instance environments - Disables Vector and JSON tests on managed instances since these features are not yet supported
- Disables connection resiliency, MARS, distributed transaction, and XEvent tracing tests due to missing required permissions
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| DataTestUtility.cs | Adds IsNotManagedInstance() utility method for test filtering |
| XEventsTracingTest.cs | Disables XEvent tracing test on managed instances |
| VectorTypeBackwardCompatibilityTests.cs | Disables all vector backward compatibility tests on managed instances |
| NativeVectorFloat32Tests.cs | Disables all native vector tests on managed instances |
| DistributedTransactionTest.Windows.cs | Disables distributed transaction test with detailed comment explaining the issue |
| MARSSessionPoolingTest.cs | Disables all MARS session pooling tests on managed instances |
| JsonTest.cs | Disables all JSON feature tests on managed instances |
| JsonStreamTest.cs | Disables JSON streaming tests on managed instances |
| JsonBulkCopyTest.cs | Disables JSON bulk copy tests on managed instances |
| ConnectivityTest.cs | Disables connection resiliency SPID test on managed instances |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3678 +/- ##
==========================================
+ Coverage 77.40% 77.41% +0.01%
==========================================
Files 273 274 +1
Lines 46059 45564 -495
==========================================
- Hits 35651 35275 -376
+ Misses 10408 10289 -119
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:
|
priyankatiwari08
approved these changes
Oct 14, 2025
mdaigle
added a commit
to mdaigle/SqlClient
that referenced
this pull request
Jan 7, 2026
* Disable connection resiliency test on SQL Managed Instance * Disable incompatible tests with SQL Managed Instance * Disable MARS session pooling tests * Disable preserve distributed transaction test on managed instance --------- Co-authored-by: Cheena Malhotra <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Disables tests that require capabilities that are not available or configured for the managed instance tests.
Azure SQL Managed Instances are available via "Azure" endpoints, yet run on the latest stable version of SQL Server (currently 2022). Certain features that are only available on Azure SQL such as JSON and Vector need to be skipped until managed instance transitions to SQL Server 2025.
Other tests rely on permissions that currently are not available to the MI test user. Those will be re-enabled later as those permissions are added and verified. https://sqlclientdrivers.visualstudio.com/ADO.Net/_workitems/edit/38472
Unsupported:
Missing permissions:
ALTER ANY CONNECTIONpermission to the userVIEW SERVER PERFORMANCE STATEpermission to the userALTER ANY CONNECTIONpermission to the userVIEW SERVER PERFORMANCE STATEpermission to the user