Skip to content

[7.1.3 Cherry-pick] Manage SimulatedServer flaky test failures - #5087

Draft
github-actions[bot] wants to merge 2 commits into
release/7.1from
dev/automation/pr-4804-to-7.1.3
Draft

github-actions[bot] wants to merge 2 commits into
release/7.1from
dev/automation/pr-4804-to-7.1.3

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Description

Backports the applicable part of #4804 (authored by @cheenamalhotra, merged as c7ab087) to release/7.1 for 7.1.3. The failed cherry-pick is resolved in abb233d.

Adds [Trait("category", "flaky")] to ConnectionFailoverTests.NetworkError_TriggersFailover_ClearsPool. Its existing assertions remain unchanged; CI intermittently observes three failover-server pre-logins instead of two after the pool is cleared and the connection is reopened. This routes the test into the existing quarantine steps rather than changing driver behavior.

Release-specific resolution: retain the absence of IsolationLevelResetTests.cs. Neither the isolation-level reset feature nor its ResetSessionIsolationLevel_UsesOpenBudget test exists on release/7.1, so the original PR's setup-login-timeout adjustment does not apply. Do not introduce that feature or test as part of this servicing change.

Test-only change. No product code, public APIs, dependencies, localization, or documentation changes.

Issues

Backport of #4804; CI test flakiness, no separate customer issue.

Testing

Validated on Windows using the release branch's .NET 10 SDK and existing test projects. The initial validation attempt found missing NuGet assets; dotnet restore src\Microsoft.Data.SqlClient\tests\UnitTests\Microsoft.Data.SqlClient.UnitTests.csproj --verbosity quiet then passed without dependency-version changes.

dotnet test src\Microsoft.Data.SqlClient\tests\UnitTests\Microsoft.Data.SqlClient.UnitTests.csproj -f net8.0 --no-restore --no-build --filter 'FullyQualifiedName=Microsoft.Data.SqlClient.UnitTests.SimulatedServerTests.ConnectionFailoverTests.NetworkError_TriggersFailover_ClearsPool&category=flaky' --blame-hang-timeout 2m --verbosity quiet

Passed: 1, failed: 0, skipped: 0.

dotnet test src\Microsoft.Data.SqlClient\tests\UnitTests\Microsoft.Data.SqlClient.UnitTests.csproj -f net462 --no-restore --no-build --filter 'FullyQualifiedName=Microsoft.Data.SqlClient.UnitTests.SimulatedServerTests.ConnectionFailoverTests.NetworkError_TriggersFailover_ClearsPool&category=flaky' --blame-hang-timeout 2m --verbosity quiet

Passed: 1, failed: 0, skipped: 0.

dotnet test src\Microsoft.Data.SqlClient\tests\UnitTests\Microsoft.Data.SqlClient.UnitTests.csproj -f net8.0 --no-restore --list-tests --filter 'FullyQualifiedName=Microsoft.Data.SqlClient.UnitTests.SimulatedServerTests.ConnectionFailoverTests.NetworkError_TriggersFailover_ClearsPool&category=flaky' --verbosity quiet
dotnet test src\Microsoft.Data.SqlClient\tests\UnitTests\Microsoft.Data.SqlClient.UnitTests.csproj -f net462 --no-restore --list-tests --filter 'FullyQualifiedName=Microsoft.Data.SqlClient.UnitTests.SimulatedServerTests.ConnectionFailoverTests.NetworkError_TriggersFailover_ClearsPool&category=flaky' --verbosity quiet

Both builds/discovery commands passed and listed exactly the affected test. Before the change, the same .NET 8 discovery command listed no tests with this combined name/category filter, confirming that the quarantine routing changed. Zero-match baseline discovery is not counted as test coverage.

git diff HEAD --check and the staged whitespace check passed; no unmerged index entries or conflict markers remained. Source and target heads were refreshed and unchanged before the normal non-force push to the existing PR branch. No full test suite or .NET 9/.NET 10 test executions were performed. This remains draft pending CI; local passes do not establish that intermittent failures can no longer occur.

Guidelines

Please review the contribution guidelines before submitting a pull request:

To resolve, run:  git cherry-pick c7ab087
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@mdaigle mdaigle assigned mdaigle and unassigned cheenamalhotra Nov 16, 2026
Retain the target release without isolation-level reset tests; only the failover quarantine from c7ab087 applies.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@mdaigle mdaigle changed the title [7.1.3 Cherry-pick - CONFLICTS] Manage SimulatedServer flaky test failures [7.1.3 Cherry-pick] Manage SimulatedServer flaky test failures Nov 16, 2026
@mdaigle

mdaigle commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To triage

Development

Successfully merging this pull request may close these issues.

2 participants