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
[6.1] Tests: Backport recent quarantines and stability fixes - #5133
Consolidated backport of applicable recent main quarantines and flaky-test improvements to release/6.1, reviewed through 51da3ab3483ab9f5fa3442d4193ae82c1e1c2d24 (November 23). Companion 8.0 backport: #5132.
Adapt Fix quarantined pool checkout worker scheduling #5119's checkout scheduling repair to the existing synchronous method and one-argument connection-string provider, with explicit worker startup, cleanup/draining, retained quarantine/probation, and an ordinary single-worker scheduler regression.
Keep the older manual transaction-cleanup test quarantined; do not import the absent transaction-pool unit harness.
Applicability and duplication
Do not import absent pool-v2 unit/instrumentation, isolation-reset, isolation-leak, reclaimed-connection reuse, vector metadata, or asynchronous schema scenarios. Existing failover/worker-start quarantines and schema deadlock retries are not duplicated. Inspected open release backports #4979, #5082, #5097, #5103, and #5124. In particular, no PRELOGIN changes from #4979 or NuGet-auditing changes from #5097 are included.
No production driver, public API, dependency, or pipeline changes. Preserve existing release-specific platform conditions and quarantines. Probation remains tracking metadata and starts independently on this branch only when the fix and traits merge.
Validation
Focused simulator execution passed all 116 selected cases on each of net8.0 and net9.0, with zero failures/skips in the final runs. Integrated-auth execution is excluded because this Linux host lacks the required Kerberos context. The lifecycle setup was adapted after four original disposal cases exposed an older Debug SNI assertion.
ManualTests compiled on net8.0 and net9.0 with zero warnings/errors. Discovery verified affected manual quarantines and confirmed the scheduler regression stays outside quarantine.
Certificate scripts passed PowerShell syntax checks; they were not executed. git diff --check passed.
Local restore used -p:NuGetAudit=false because vulnerability-feed access failed with NU1900/NU1905. This was a command-line validation workaround only, not a committed policy change or a successful vulnerability audit.
net462 validation was blocked by the older Linux restore/framework-selection configuration. The initial explicit restore hit NU1009 for implicit reference-assembly packages; a command-only override allowed restore, but Windows builds/execution remain unverified.
Live-SQL manual tests and long-term quarantine stability remain for CI.
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
Addressed Copilot feedback in f9d0e57; the inherited main fixes are in #5137.
Mark physical transport failures and explicitly expected TLS rejection separately from handler exceptions. Handler IOException/SocketException and diagnostic log failures now survive disposal; the original-filter mutation fails the new handler-I/O regressions.
Require an actual first physical failure, exactly one configured retry event, and a distinct second-session pre-login gate before success. Cover sync/async opens and both MultiSubnetFailover settings. ConnectRetryCount does not retry a pre-login reset, so the regression uses an explicit configurable network-error retry policy.
Adapt 6.1's injection to abort only after observing ClientHello, using the shared certificate-generation fixture and the minimal existing-main TLS-start hook. This avoids the older Debug provider-EOF formatter without changing production code or suppressing assertions. Retain flaky and add probation.
Final net8.0 validation: 31 focused cases and all 424 selected broader simulator cases passed, with zero failures/skips. The earlier Debug-injection failures were corrected before this commit. Existing Windows/net462, Kerberos, and live-SQL validation gaps remain as documented above.
Consolidate applicable main quarantines, simulator lifecycle and fault scheduling fixes, MARS teardown assertions, and the pool checkout scheduler regression. Preserve older simulator and certificate APIs and avoid absent feature tests and pending backport work.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The exception filter swallows handler-originated IOExceptions even without a shutdown request, leaving ProcessingException unset and allowing disposal to succeed despite a handler failure.
Backports applicable test quarantines and stability fixes to release/6.1, adapting them to the branch’s older test infrastructure. No production driver, public API, dependency, or pipeline changes are included.
Changes:
Adds applicable flaky-test markings while preserving existing quarantines and adding probation metadata for repaired cases.
Stabilizes simulator workers, shutdown, fault handling, pool isolation, and certificate scenarios, with controlled regression tests.
Repairs pool-checkout scheduling and MARS fatal-error assertions without importing unsupported newer test scenarios.
File
Description
TESTGUIDE.md
Documents simulator lifecycle, pool isolation, and certificate testing.
paulmedynski
changed the title
Tests: Backport recent quarantines and stability fixes to 6.1
[6.1] Tests: Backport recent quarantines and stability fixes
Nov 23, 2026
Report handler and diagnostic I/O failures and prove physical failure followed by an observed configurable retry. Abort the first TLS transport only after ClientHello to avoid the older Debug EOF formatter without suppressing driver assertions.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved shutdown races, unreported logging failures, and overly broad constructor-failure cleanup can cause unexpected worker failures or alter unrelated SQL Server settings.
This new constructor-failure path calls the full fixture disposal routine, which also clears the real SQL Server's encryption registry settings and stops/restarts its service on Windows. At this point setup has only attempted to generate a simulator certificate, so a missing PowerShell executable or script timeout now changes an unrelated server configuration; a service-control failure can also replace the original setup exception. Restrict partial-construction cleanup to the generated certificate/files and preserve the original failure.
Record connection-close logging failures during teardown
If the connection-close log write throws after the connection is removed, the exception faults the worker task without entering _errors. When this happens before Stop() takes its snapshot, disposal can succeed without reporting the failure. Catch and record the logging exception under the existing lock so teardown reports it.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The new certificate fixture leaves persisted private keys on Windows, and the updated PowerShell wrapper no longer matches the existing Pester assertion, causing an orchestration test failure.
On modern .NET, CertificateFixtureBase.CreateCertificate imports the PFX with PersistKeySet (Common/Fixtures/CertificateFixtureBase.cs:108–122), so disposing the returned certificate leaves its private key on disk on Windows. This new fixture does not delete that key, so repeated quarantine runs accumulate persisted keys. Add an import option that omits PersistKeySet for this socket-only fixture, or explicitly delete its generated key during cleanup.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
A critical unpublished finding indicates that listener error logging can let an exception escape and terminate the test host, requiring human assessment.
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/6.1, reviewed through51da3ab3483ab9f5fa3442d4193ae82c1e1c2d24(November 23). Companion 8.0 backport: #5132.Applicability and duplication
Do not import absent pool-v2 unit/instrumentation, isolation-reset, isolation-leak, reclaimed-connection reuse, vector metadata, or asynchronous schema scenarios. Existing failover/worker-start quarantines and schema deadlock retries are not duplicated. Inspected open release backports #4979, #5082, #5097, #5103, and #5124. In particular, no PRELOGIN changes from #4979 or NuGet-auditing changes from #5097 are included.
No production driver, public API, dependency, or pipeline changes. Preserve existing release-specific platform conditions and quarantines. Probation remains tracking metadata and starts independently on this branch only when the fix and traits merge.
Validation
Focused simulator execution passed all 116 selected cases on each of net8.0 and net9.0, with zero failures/skips in the final runs. Integrated-auth execution is excluded because this Linux host lacks the required Kerberos context. The lifecycle setup was adapted after four original disposal cases exposed an older Debug SNI assertion.
ManualTests compiled on net8.0 and net9.0 with zero warnings/errors. Discovery verified affected manual quarantines and confirmed the scheduler regression stays outside quarantine.
Certificate scripts passed PowerShell syntax checks; they were not executed.
git diff --checkpassed.Local restore used
-p:NuGetAudit=falsebecause vulnerability-feed access failed with NU1900/NU1905. This was a command-line validation workaround only, not a committed policy change or a successful vulnerability audit.net462 validation was blocked by the older Linux restore/framework-selection configuration. The initial explicit restore hit NU1009 for implicit reference-assembly packages; a command-only override allowed restore, but Windows builds/execution remain unverified.
Live-SQL manual tests and long-term quarantine stability remain for CI.
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
Addressed Copilot feedback in f9d0e57; the inherited main fixes are in #5137.