You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[7.1] Tests: Backport recent quarantines and stability fixes - #5135
Consolidated backport of applicable recent main quarantines and flaky-test improvements to release/7.1, reviewed through 51da3ab3483ab9f5fa3442d4193ae82c1e1c2d24 (November 23). Companion 8.0 backport: #5132.
Backport Flaky tests / lighter test queries #4344's deterministic pruning regression in place of the flaky manual transaction-cleanup test. The only driver-file change is the upstream cleanup callback's nullable annotation and documentation; its implementation and runtime behavior are unchanged.
Applicability and duplication
Do not import absent isolation-reset, isolation-leak, reclaimed-connection reuse, or vector metadata tests/features. Existing schema deadlock retries, #4804, #5094, and #5105 are already on the release branch and are not duplicated. Inspected all open release backports: #4979, #5082, #5097, #5103, and #5124. This PR excludes their PRELOGIN, pipeline/data-source-enumerator, NuGet-audit, encryption-feature, and managed-identity changes.
No public API, package dependency, or pipeline changes. Existing platform conditions and release-specific test inputs are preserved. Repaired tests keep flaky; probation remains metadata rather than promotion into the ordinary suite. Probation starts independently on this branch only when the repair and traits merge.
Validation
Focused simulator execution: 137 passed with zero skips on each of net8.0, net9.0, and net10.0. The net10.0 run first had one Address already in use failure; a complete retry passed. Integrated-auth simulator execution is excluded because this Linux environment lacks the required Kerberos context; this is not a claimed pass.
All six affected pool regression cases passed on net8.0 with zero failures/skips; --list-tests confirmed the exact selection.
UnitTests compiled for the modern targets and net462. ManualTests compiled for net8.0 and net462. The net462 builds succeeded with transient copy-retry warnings from concurrent builds.
Discovery verified affected manual quarantines under category=flaky and the scheduler regression under category!=flaky.
Certificate scripts passed PowerShell syntax checks; they were not executed. git diff --check passed.
Live-SQL manual execution and Windows/.NET Framework execution remain for CI. No repeated long-term stability claim is made.
Tests added or updated
Public API changes documented (not applicable)
Verified against customer repro (not applicable; test-maintenance backport)
Ensure no breaking changes introduced
Review follow-up
Apply the inherited fixes from #5137 in 2b353de, although this PR had no inline Copilot findings.
Pin the held-slot pool regression to the legacy wait-budget policy and observe actual parked checkout before measuring the hold interval.
Propagate simulator handler and diagnostic I/O failures; tolerate only marked physical transport failures and explicitly expected TLS rejection.
Require a first physical abort, exactly one configured retry event, and a distinct second-session pre-login gate. Cover sync/async opens and both MultiSubnetFailover settings. Use an explicit configurable network-error policy because ConnectRetryCount does not retry a pre-login reset; retain flaky and add probation.
Final net8.0 validation: 33 focused cases and all 561 selected broader simulator cases passed, with zero failures/skips. net462 compilation passed with zero warnings/errors. Existing Windows/native SNI, Kerberos, and live-SQL validation gaps remain as documented above.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The transport/TLS and certificate trust-store backport still requires Windows/.NET Framework/native-SNI validation and live-SQL certificate, service-cleanup, and pooling checks.
No open issues 🎉
What changed in this PR
Backports applicable test quarantines and stability fixes from main to release/7.1. The changes strengthen SqlClient’s test infrastructure without changing production runtime behavior, public APIs, dependencies, or pipelines.
Changes:
Stabilize simulator workers, fault injection, transport disposal, and certificate validation; add lifecycle regressions.
Repair pool checkout scheduling, timeout synchronization, and instrumentation tests; replace timing-dependent transaction cleanup coverage with deterministic pruning.
Apply targeted quarantines, retain flaky on repaired scenarios, and document branch-specific probation tracking.
Live-SQL and Windows/.NET Framework execution remain for CI, as noted in the PR.
File
Description
TESTGUIDE.md
Documents simulator lifecycle, pool isolation, and certificate testing.
Documents pruning and annotates nullable callback state; logic unchanged.
.github/instructions/testing.instructions.md
Documents probation metadata and promotion requirements.
Review effort: Balanced
paulmedynski
changed the title
Tests: Backport recent quarantines and stability fixes to 7.1
[7.1] Tests: Backport recent quarantines and stability fixes
Nov 23, 2026
Propagate simulator handler I/O failures, require a physical failure and observed retry, and synchronize the legacy-budget pool wait regression. Retain quarantine and probation routing.
Co-authored-by: Copilot <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Shutdown can race with in-flight handlers and cause unexpected worker failures, while a connection-close logging exception can escape error tracking and let disposal silently succeed.
If the Connection Closed log throws after an otherwise successful session, the connection has already been removed and the worker faults outside its processing catch blocks. A later Stop() neither waits for that worker nor finds the logging failure in _errors, so disposal can silently succeed. Catch and record the logging exception while holding the collection lock.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Cleanup errors are suppressed rather than preserved alongside setup failures, and failed certificate removal can still delete thumbprint.txt, losing the leaked certificate’s ownership marker.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Preserve cleanup errors and thumbprint when certificate removal fails
RemoveCertificate() suppresses certificate-store errors, and TryCleanup() suppresses file errors, so this handler does not preserve ordinary cleanup failures alongside the setup exception. If certificate export and subsequent store removal both fail, cleanup can also delete thumbprint.txt, losing the leaked certificate's ownership marker. Collect and throw cleanup errors after attempting the remaining steps, and retain the thumbprint when store cleanup fails.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Transport/TLS and certificate-lifecycle changes remain unverified on Windows/native SNI, .NET Framework 4.6.2, and live SQL, while certificate scripts were only syntax-checked.
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
Area\TestsIssues that are targeted to tests or test projects
2 participants
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.
Summary
Consolidated backport of applicable recent
mainquarantines and flaky-test improvements torelease/7.1, reviewed through51da3ab3483ab9f5fa3442d4193ae82c1e1c2d24(November 23). Companion 8.0 backport: #5132.Applicability and duplication
Do not import absent isolation-reset, isolation-leak, reclaimed-connection reuse, or vector metadata tests/features. Existing schema deadlock retries, #4804, #5094, and #5105 are already on the release branch and are not duplicated. Inspected all open release backports: #4979, #5082, #5097, #5103, and #5124. This PR excludes their PRELOGIN, pipeline/data-source-enumerator, NuGet-audit, encryption-feature, and managed-identity changes.
No public API, package dependency, or pipeline changes. Existing platform conditions and release-specific test inputs are preserved. Repaired tests keep
flaky;probationremains metadata rather than promotion into the ordinary suite. Probation starts independently on this branch only when the repair and traits merge.Validation
Focused simulator execution: 137 passed with zero skips on each of net8.0, net9.0, and net10.0. The net10.0 run first had one
Address already in usefailure; a complete retry passed. Integrated-auth simulator execution is excluded because this Linux environment lacks the required Kerberos context; this is not a claimed pass.All six affected pool regression cases passed on net8.0 with zero failures/skips;
--list-testsconfirmed the exact selection.UnitTests compiled for the modern targets and net462. ManualTests compiled for net8.0 and net462. The net462 builds succeeded with transient copy-retry warnings from concurrent builds.
Discovery verified affected manual quarantines under
category=flakyand the scheduler regression undercategory!=flaky.Certificate scripts passed PowerShell syntax checks; they were not executed.
git diff --checkpassed.Live-SQL manual execution and Windows/.NET Framework execution remain for CI. No repeated long-term stability claim is made.
Tests added or updated
Public API changes documented (not applicable)
Verified against customer repro (not applicable; test-maintenance backport)
Ensure no breaking changes introduced
Review follow-up
Apply the inherited fixes from #5137 in 2b353de, although this PR had no inline Copilot findings.