Skip to content

[6.1] Tests: Backport quarantine categories and filters - #5133

Open
paulmedynski wants to merge 6 commits into
release/6.1from
dev/automation/quarantine-backports-6.1
Open

paulmedynski wants to merge 6 commits into
release/6.1from
dev/automation/quarantine-backports-6.1

Conversation

@paulmedynski

@paulmedynski paulmedynski commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Backport applicable flaky-test categories and quarantine pipeline filters to release/6.1.

Validation

  • All 9 quarantine expressions in this release were checked; each includes both category=flaky and category!=failing. Verified the YAML edits are exactly this substitution with no other template changes.
  • Focused Pester negative control: all affected template cases failed before the repair. Repaired run: 1 passed, zero failures/skips on this release; seven cases passed across the three backports.
  • Whitespace checks passed. Earlier category-only compilation/discovery checks remain recorded; the new changes are pipeline expressions, a static Pester regression, and its documentation, with no C# changes.
  • Full Azure DevOps pipeline execution, Windows/native-SNI/.NET Framework execution, and live-SQL execution are not claimed.
  • TransactionCleanupTest is netfx-only on this release; its category was verified in source, but Windows discovery remains unverified.

Checklist

  • Tests added or updated
  • Public API changes documented (none)
  • Verified against customer repro (not applicable)
  • Ensure no breaking changes introduced

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>
Copilot AI balanced review requested due to automatic review settings November 23, 2026 18:34
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Nov 23, 2026
@paulmedynski paulmedynski added the Area\Tests Issues that are targeted to tests or test projects label Nov 23, 2026
@paulmedynski paulmedynski moved this from To triage to In progress in SqlClient Board Nov 23, 2026
@paulmedynski paulmedynski added this to the 6.1.9 milestone Nov 23, 2026

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.

🟡 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.

1 open issue
What changed in this PR

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.
src/​Microsoft.Data.SqlClient/​tests/​UnitTests/​SimulatedServerTests/​ServerLifecycleTests.cs Adds lifecycle, fault-budget, and TLS regressions.
src/​Microsoft.Data.SqlClient/​tests/​UnitTests/​SimulatedServerTests/​ServerEndPointConnectionTests.cs Tests transport initialization against concurrent disposal.
src/​Microsoft.Data.SqlClient/​tests/​UnitTests/​SimulatedServerTests/​Fixtures/​SimulatedServerPoolScope.cs Isolates and clears scenario-owned pools.
src/​Microsoft.Data.SqlClient/​tests/​UnitTests/​SimulatedServerTests/​Fixtures/​GatedTdsServer.cs Adds explicit pre-login response gates.
src/​Microsoft.Data.SqlClient/​tests/​UnitTests/​SimulatedServerTests/​ConnectionTests.cs Stabilizes connection scenarios and applies quarantines.
src/​Microsoft.Data.SqlClient/​tests/​UnitTests/​SimulatedServerTests/​ConnectionFailoverTests.cs Adds gated failover, pool-identity assertions, and async coverage.
src/​Microsoft.Data.SqlClient/​tests/​tools/​TDS/​TDS/​TDSUtilities.cs Handles omitted encryption metadata without negotiating TLS.
src/​Microsoft.Data.SqlClient/​tests/​tools/​TDS/​TDS.Servers/​TransientTdsErrorTdsServer.cs Reserves transient errors atomically and resets rearmed budgets.
src/​Microsoft.Data.SqlClient/​tests/​tools/​TDS/​TDS.Servers/​TransientDelayTdsServer.cs Reserves delays atomically and cancels them during disposal.
src/​Microsoft.Data.SqlClient/​tests/​tools/​TDS/​TDS.Servers/​TdsServerArguments.cs Adds an explicit expected TLS-failure setting.
src/​Microsoft.Data.SqlClient/​tests/​tools/​TDS/​TDS.Servers/​GenericTdsServer.cs Forwards TLS expectations and atomically detaches disposed endpoints.
src/​Microsoft.Data.SqlClient/​tests/​tools/​TDS/​TDS.EndPoint/​TDSServerEndPointConnection.cs Uses dedicated workers, serialized transport startup, and worker draining.
src/​Microsoft.Data.SqlClient/​tests/​tools/​TDS/​TDS.EndPoint/​TDSServerEndPoint.cs Coordinates listener shutdown, connection ownership, and failure reporting.
src/​Microsoft.Data.SqlClient/​tests/​tools/​TDS/​TDS.EndPoint/​TDSParser.cs Separates expected TLS rejection from certificate setup failures.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​TracingTests/​EventSourceTest.cs Quarantines intermittent listener enumeration failures.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​SqlSchemaInfoTest/​SqlSchemaInfoTest.cs Quarantines the existing synchronous schema theory.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​SplitPacketTest/​SplitPacketTest.cs Quarantines four intermittent split-packet tests.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​MARSTest/​MARSTest.cs Quarantines shared-connection concurrency timeouts.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​ConnectivityTests/​ConnectivityTest.cs Quarantines the async no-retry timing assertion.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​ConnectionTestWithSSLCert/​CertificateTestWithTdsServer.cs Keeps certificates untrusted and strengthens outcome checks and cleanup.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​ConnectionTestWithSSLCert/​CertificateTest.cs Applies quarantines to release-specific certificate methods.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​ConnectionPoolTest/​TransactionPoolTest.cs Quarantines the older transaction-cleanup test.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​ConnectionPoolTest/​PoolBlockPeriodTest.cs Quarantines intermittent blocking-period timing failures.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​ConnectionPoolTest/​ConnectionPoolTest.cs Repairs worker scheduling and adds an ordinary scheduler regression.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​AsyncTest/​MarsReceiveTeardownTest.cs Accepts racing teardown outcomes while requiring a fatal SQL error.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​removecert.ps1 Adds trust-preserving cleanup and corrects the certificate directory.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​makepfxcert.ps1 Adds certificate generation without modifying root trust stores.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​DDBasics/​DDAsyncTest/​DDAsyncTest.cs Quarantines intermittent concurrent list-write failures.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​DataCommon/​ConnectionTestParametersData.cs Corrects a mismatched-certificate matrix case.

Review effort: Balanced

@paulmedynski 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>
Copilot AI balanced review requested due to automatic review settings November 24, 2026 12:15

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.

🟡 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.

1 open issue
2 previously missed issues

In code that hasn't changed since last review

Medium severity Limit constructor-failure cleanup to simulator resources

src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​ConnectionTestWithSSLCert/​CertificateTestWithTdsServer.cs:70

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.

Medium severity Record connection-close logging failures during teardown

src/​Microsoft.Data.SqlClient/​tests/​tools/​TDS/​TDS.EndPoint/​TDSServerEndPoint.cs:349

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.

1 resolved since last review

Review effort: Balanced

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 24, 2026 13:37

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.

🟡 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.

2 open issues
1 previously missed issue

In code that hasn't changed since last review

Medium severity Certificate fixture leaves persisted private keys behind

src/​Microsoft.Data.SqlClient/​tests/​UnitTests/​SimulatedServerTests/​ConnectionTests.cs:281

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.

Review effort: Balanced

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 24, 2026 13:56

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.

🔵 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.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

Restore release baseline test bodies and infrastructure, retaining applicable flaky categories and adding the remaining split-packet quarantines from #5143. Defer behavioral repairs to separate backports.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@paulmedynski paulmedynski changed the title [6.1] Tests: Backport recent quarantines and stability fixes [6.1] Tests: Backport quarantine categories only Nov 27, 2026
Copilot AI balanced review requested due to automatic review settings November 27, 2026 13:01

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.

🟡 Changes recommended

The new flaky annotations allow Windows-only certificate tests to run in Linux quarantine jobs and reach unsupported setup, so the dependent filter correction must land first or both annotations must be deferred.

1 open issue

Review effort: Balanced

Backport the quarantine-filter portion of #5147, already included in release/8.0 through #5148. Adapt legacy MSBuild Filter properties without importing the scheduler fixes. Add focused Pester regression coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@paulmedynski paulmedynski changed the title [6.1] Tests: Backport quarantine categories only [6.1] Tests: Backport quarantine categories and filters Nov 27, 2026
Copilot AI balanced review requested due to automatic review settings November 27, 2026 18:38

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.

🟢 Approval recommended

No active review issues remain for the test-quarantine metadata and filtering backport.

1 open issue

Review effort: Balanced

@paulmedynski
paulmedynski marked this pull request as ready for review November 27, 2026 18:49
@paulmedynski
paulmedynski requested a review from a team as a code owner November 27, 2026 18:49
@paulmedynski paulmedynski moved this from In progress to In review in SqlClient Board Nov 27, 2026
@paulmedynski
paulmedynski enabled auto-merge (squash) November 27, 2026 18:49

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

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.

4 participants