Quarantine new flaky tests#4453
Draft
paulmedynski wants to merge 8 commits into
Draft
Conversation
…flaky - Quarantining more flaky tests.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR quarantines several intermittently failing unit tests by marking them with the Category=flaky trait so they’re excluded from the default CI test filter.
Changes:
- Added
[Trait("Category", "flaky")]to additional simulated-server and connection-pool unit tests. - Updated/expanded inline comments around flaky failures (including pasted CI failure output).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/Microsoft.Data.SqlClient/tests/UnitTests/SimulatedServerTests/ConnectionTests.cs | Quarantines an async transient-fault retry test. |
| src/Microsoft.Data.SqlClient/tests/UnitTests/SimulatedServerTests/ConnectionRoutingTests.cs | Quarantines a routed-location network delay test. |
| src/Microsoft.Data.SqlClient/tests/UnitTests/SimulatedServerTests/ConnectionFailoverTests.cs | Quarantines additional failover/transient-fault test cases and adjusts related comments. |
| src/Microsoft.Data.SqlClient/tests/UnitTests/ConnectionPool/WaitHandleDbConnectionPoolShutdownTest.cs | Quarantines a shutdown/unblock waiter test that can fail on slow agents. |
paulmedynski
enabled auto-merge (squash)
July 17, 2026 12:23
mdaigle
previously approved these changes
Jul 17, 2026
cheenamalhotra
previously approved these changes
Jul 17, 2026
- Quarantine ConnectionFailoverTests.NetworkTimeout_ShouldFail (CI Assert.Equal timing flake). - Quarantine ConnectionTests.NetworkError_RetryEnabled_ShouldSucceed_Async (post-login connection timeout flake). - Remove unrelated ConnectionFailoverTests.TransientFault_ShouldConnectToPrimary failure line from the Shutdown_UnblocksSyncWaiter quarantine comment.
#4453) - macOS: retry 'docker pull' of the mssql image (5x, 15s backoff) to tolerate mcr.microsoft.com DNS/registry timeouts, and verify 'docker run' launched the container. - Windows: retry the FileStream sp_configure (10x, 5s sleep) to tolerate transient post-restart 'session is in the kill state' severe errors.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (3)
src/Microsoft.Data.SqlClient/tests/UnitTests/SimulatedServerTests/ConnectionFailoverTests.cs:358
- Spelling in the quoted failure text: "Principle server" should be "principal server" (principal endpoint). Since this comment block was edited in this PR, it’s a good chance to fix the typo to avoid propagating it further.
This failure occurred while attempting to connect to the Principle server.
src/Microsoft.Data.SqlClient/tests/UnitTests/SimulatedServerTests/ConnectionFailoverTests.cs:422
- Spelling in the quoted failure text: "Principle server" should be "principal server" (principal endpoint).
This failure occurred while attempting to connect to the Principle server.
src/Microsoft.Data.SqlClient/tests/UnitTests/SimulatedServerTests/ConnectionFailoverTests.cs:431
- Spelling in the quoted failure text: "Principle server" should be "principal server" (principal endpoint).
This failure occurred while attempting to connect to the Principle server.
| # Pull the SQL Server image with retries. The macOS agents intermittently | ||
| # fail to resolve or reach mcr.microsoft.com (DNS lookups or registry i/o | ||
| # time out), which previously failed the whole step on the first attempt. | ||
| # Retry a handful of times with a back-off before giving up. |
Comment on lines
+323
to
+327
| # Immediately after the restart SQL Server can still be stabilizing, which | ||
| # can surface transient errors such as "the session is in the kill state" | ||
| # or other severe command errors. Retry a few times before failing so a | ||
| # momentary hiccup does not fail the whole step. | ||
| $tries = 0 |
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.
Quarantining some new flaky tests.