Skip to content

[7.0] Tests: Backport quarantine categories and filters - #5134

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

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

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/7.0.

Validation

  • All 13 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: 3 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.

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. Adapt to existing release APIs without importing absent feature tests or overlapping pending backports.

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 modified the milestones: 7.1.3, 7.0.5 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 changes remove required flaky-test quarantines and weaken connection regression coverage by allowing the test to pass without exercising a failed attempt or retry.

2 open issues
What changed in this PR

Backports test quarantines and stability fixes to release/7.0, adapting upstream changes to the branch’s existing test APIs. No production driver, public API, dependency, or pipeline changes are included.

Changes:

  • Adds targeted manual-test quarantines and probation metadata for repaired tests.
  • Stabilizes simulator workers, fault quotas, transport lifecycle, failover setup, and certificate handling.
  • Repairs pool-checkout scheduling and MARS teardown assertions, with focused regression coverage.
File Description
TESTGUIDE.md Documents simulator ownership, isolation, and certificate practices.
src/​Microsoft.Data.SqlClient/​tests/​UnitTests/​SimulatedServerTests/​ServerLifecycleTests.cs Adds lifecycle, TLS, scheduling, and fault-quota regressions.
src/​Microsoft.Data.SqlClient/​tests/​UnitTests/​SimulatedServerTests/​ServerEndPointConnectionTests.cs Tests transport startup against concurrent disposal.
src/​Microsoft.Data.SqlClient/​tests/​UnitTests/​SimulatedServerTests/​Fixtures/​GatedTdsServer.cs Adds explicit pre-login response gating.
src/​Microsoft.Data.SqlClient/​tests/​UnitTests/​SimulatedServerTests/​ConnectionTests.cs Revises retry setup, pool isolation, and timing assertions.
src/​Microsoft.Data.SqlClient/​tests/​UnitTests/​SimulatedServerTests/​ConnectionFailoverTests.cs Adds gated failover, physical-connection assertions, and async cases.
src/​Microsoft.Data.SqlClient/​tests/​tools/​TDS/​TDS/​TDSUtilities.cs Prevents TLS negotiation when encryption metadata is omitted.
src/​Microsoft.Data.SqlClient/​tests/​tools/​TDS/​TDS.Servers/​TransientTdsErrorTdsServer.cs Reserves error quotas atomically and supports rearming.
src/​Microsoft.Data.SqlClient/​tests/​tools/​TDS/​TDS.Servers/​TransientDelayTdsServer.cs Reserves delay quotas atomically and cancels waits during disposal.
src/​Microsoft.Data.SqlClient/​tests/​tools/​TDS/​TDS.Servers/​TdsServerArguments.cs Adds an expected TLS-failure option.
src/​Microsoft.Data.SqlClient/​tests/​tools/​TDS/​TDS.Servers/​GenericTdsServer.cs Tracks login requests and updates endpoint disposal.
src/​Microsoft.Data.SqlClient/​tests/​tools/​TDS/​TDS.EndPoint/​TDSServerEndPointConnection.cs Uses dedicated workers and serializes transport startup with closure.
src/​Microsoft.Data.SqlClient/​tests/​tools/​TDS/​TDS.EndPoint/​TDSServerEndPoint.cs Registers workers before startup and collects shutdown failures.
src/​Microsoft.Data.SqlClient/​tests/​tools/​TDS/​TDS.EndPoint/​TDSParser.cs Distinguishes expected TLS failures from certificate setup errors.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​TracingTests/​EventSourceTest.cs Quarantines listener-enumeration instability.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​SqlSchemaInfoTest/​SqlSchemaInfoTest.cs Quarantines synchronous schema tests.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​SplitPacketTest/​SplitPacketTest.cs Quarantines four split-packet tests.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​MARSTest/​MARSTest.cs Quarantines shared-connection MARS concurrency testing.
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 improves assertions and cleanup.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​ConnectionTestWithSSLCert/​CertificateTest.cs Quarantines two certificate tests.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​ConnectionPoolTest/​TransactionPoolTest.cs Quarantines transaction-pool cleanup testing.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​ConnectionPoolTest/​PoolBlockPeriodTest.cs Quarantines blocking-period timing assertions.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​ConnectionPoolTest/​ConnectionPoolTest.cs Repairs worker scheduling and adds a single-worker scheduler regression.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​AsyncTest/​MarsReceiveTeardownTest.cs Accepts either session reporting the required fatal error.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​removecert.ps1 Supports cleanup without changing root trust stores.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​makepfxcert.ps1 Adds certificate generation without trust installation.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​DDBasics/​DDAsyncTest/​DDAsyncTest.cs Quarantines the concurrent list-write failure.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​DataCommon/​ConnectionTestParametersData.cs Replaces a contradictory duplicate certificate case.

Review effort: Balanced

@paulmedynski paulmedynski changed the title Tests: Backport recent quarantines and stability fixes to 7.0 [7.0] Tests: Backport recent quarantines and stability fixes Nov 23, 2026
@codecov

codecov Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.34%. Comparing base (75ec803) to head (b16bb89).
⚠️ Report is 5 commits behind head on release/7.0.

❗ There is a different number of reports uploaded between BASE (75ec803) and HEAD (b16bb89). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (75ec803) HEAD (b16bb89)
CI-SqlClient 1 0
Additional details and impacted files
@@               Coverage Diff               @@
##           release/7.0    #5134      +/-   ##
===============================================
- Coverage        73.59%   66.34%   -7.26%     
===============================================
  Files              296      291       -5     
  Lines            43521    66427   +22906     
===============================================
+ Hits             32030    44069   +12039     
- Misses           11491    22358   +10867     
Flag Coverage Δ
CI-SqlClient ?
PR-SqlClient-Project 66.34% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Restore the release-specific failover class quarantine, propagate simulator handler I/O failures, and prove physical failure followed by an observed configurable retry on sync and async opens.

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 issues allow certificate-generation failures to bypass cleanup, connection-close logging exceptions to go unreported, and endpoint disposal races to turn normal teardown into simulator failures.

1 open issue
2 previously missed issues

In code that hasn't changed since last review

Medium severity PowerShell failures are ignored, bypassing cleanup

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

This new cleanup path does not run for certificate-generation failures: makepfxcert.ps1 catches errors and only writes a message, and RunPowershellScript checks for a timeout but never checks the process exit code. A failed generation therefore returns normally, leaving partial setup behind and allowing the test to load a missing or stale PFX. Propagate script failures and reject unsuccessful exit codes so this catch actually performs the intended cleanup.

Medium severity Connection-close logging failures are not recorded

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

If the connection-closed log writer throws after this removal, the worker task faults without recording the error, and a later Stop() can succeed without reporting it. Catch the logging exception under the existing collection lock and add it to _errors; add a regression with a writer that fails specifically on the connection-closed message.

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

🔵 Needs a closer look

The supplied Linux runs and script syntax checks leave transport/TLS and certificate changes unvalidated on Windows/native-SNI, net462, and live-SQL paths, including actual certificate-script execution.

No open issues 🎉

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: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

Human assessment is needed because the test’s synchronization can let it pass without blocking on a full pool, leaving the new scheduler regression’s coverage uncertain.

No open issues 🎉

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 [7.0] Tests: Backport recent quarantines and stability fixes [7.0] 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 certificate-test annotations admit Windows-only tests into Unix quarantine runs because the flaky filter does not exclude failing tests, risking an unsupported WindowsIdentity.GetCurrent() call.

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 [7.0] Tests: Backport quarantine categories only [7.0] 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 pipeline-filtering backport.

1 open issue

Review effort: Balanced

@paulmedynski
paulmedynski marked this pull request as ready for review November 27, 2026 18:46
@paulmedynski
paulmedynski requested a review from a team as a code owner November 27, 2026 18:46
@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:47

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