Skip to content

Quarantine new flaky tests#4453

Draft
paulmedynski wants to merge 8 commits into
mainfrom
dev/paul/quarantine
Draft

Quarantine new flaky tests#4453
paulmedynski wants to merge 8 commits into
mainfrom
dev/paul/quarantine

Conversation

@paulmedynski

Copy link
Copy Markdown
Contributor

Quarantining some new flaky tests.

@paulmedynski paulmedynski added this to the 7.1.0-preview3 milestone Jul 17, 2026
@paulmedynski
paulmedynski requested a review from a team as a code owner July 17, 2026 12:15
Copilot AI review requested due to automatic review settings July 17, 2026 12:15
@paulmedynski paulmedynski added the Area\Tests Issues that are targeted to tests or test projects label Jul 17, 2026
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Jul 17, 2026
@paulmedynski paulmedynski linked an issue Jul 17, 2026 that may be closed by this pull request

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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
paulmedynski enabled auto-merge (squash) July 17, 2026 12:23
@paulmedynski paulmedynski moved this from To triage to In review in SqlClient Board Jul 17, 2026
Copilot AI review requested due to automatic review settings July 17, 2026 14:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

mdaigle
mdaigle previously approved these changes Jul 17, 2026
@paulmedynski
paulmedynski disabled auto-merge July 17, 2026 15:29
Copilot AI review requested due to automatic review settings July 17, 2026 16:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

Copilot AI review requested due to automatic review settings July 17, 2026 17:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 17, 2026 19:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

cheenamalhotra
cheenamalhotra previously approved these changes Jul 17, 2026
@paulmedynski
paulmedynski marked this pull request as draft July 17, 2026 19:38
Copilot AI review requested due to automatic review settings July 17, 2026 20:17
- 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 17, 2026 22:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area\Tests Issues that are targeted to tests or test projects

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

Tests | Failing tests that need to marked flaky

4 participants