Skip to content

[8.0] Tests: Backport recent quarantines and stability fixes - #5132

Draft
paulmedynski wants to merge 4 commits into
release/8.0from
dev/automation/quarantine-backports-8.0
Draft

paulmedynski wants to merge 4 commits into
release/8.0from
dev/automation/quarantine-backports-8.0

Conversation

@paulmedynski

@paulmedynski paulmedynski commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Consolidated test-maintenance backport for release/8.0, covering applicable recent main quarantines and pool stability fixes reviewed through 51da3ab3483ab9f5fa3442d4193ae82c1e1c2d24 (November 23), plus the review-driven simulator and retry-regression repairs described below.

Provenance, duplication, and applicability

The initial quarantine/pool backport omitted work already present on release/8.0, including simulator stabilization/startup fixes, earlier quarantines, schema deadlock retries, #4970, #5094, #5105, and #5119. The later shared simulator failure-contract and retry-regression repairs are additional review follow-ups, not another backport of that already-present stabilization; their inherited main equivalents are tracked in #5137.

Inspected open release backports #4979, #5082, #5097, #5103, and #5124; no pending backport work is included here. In particular, this PR does not include the connection-encryption feature in #5103 or the pipeline/data-source-enumerator work in #5082.

Review repairs are in a44bd22dd (pool-wait, transport/TLS failure tracking, and four-case retry coverage) and d6345dbcf (connection-close logging failure tracking and regression).

Validation

  • Initial backport validation: UnitTests and ManualTests builds passed for net10.0 and net462; the original focused pool selection passed five cases with zero failures/skips. Discovery verified those five pool cases and eleven affected manual-test identities under category=flaky. Those five pool cases are distinct from the four retry cases added during review.
  • Earlier expanded review validation: 37 focused net10.0 cases passed with zero failures/skips; net462 compilation passed. Restoring the old 15 ms harness budget fails the WaitHandle held-slot case; removing the first physical abort fails all four retry cases.
  • Latest review validation: 31 focused net10.0 cases passed with zero failures/skips: 27 lifecycle cases, including the new connection-close logging regression, plus all four configurable retry cases. UnitTests compilation for net462 passed with zero warnings/errors. This focused selection does not rerun the original five pool cases.
  • The shared close-log and endpoint-drain regressions were also exercised as negative controls on 7.1: both failed without their respective repairs and passed after restoration.
  • git diff --check passed. Windows/native-SNI execution and live-SQL manual tests were not run locally; CI remains required. Compilation is not execution evidence.
  • Broader prior validation is not claimed clean: separate 754-case runs had one close-race or routing-delay failure, while isolated two-case reruns passed. The failover-partner regression's identical connection-reset failure was reproduced on pristine main at 329df05d7 and excluded from those later runs.

Probation starts independently on this release only when the fix and both traits merge. PR creation and review fixes are not stability evidence.

  • Tests added or updated
  • Public API changes documented (not applicable)
  • Verified against customer repro (not applicable; test-maintenance backport)
  • Ensure no breaking changes introduced

Backport main PRs #5028, #5038, #5039, #5047, #5065, #5072, #5073, #5095, #5118, #5125, #5127, #5128, and #5129. Keep repaired pool tests quarantined on probation and exclude changes already merged or in pending backports.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 23, 2026 18:11
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Nov 23, 2026
@paulmedynski paulmedynski added this to the 8.0.0 milestone Nov 23, 2026
@paulmedynski paulmedynski added the Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems. label 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 regression test can pass with the incorrect 15 ms timeout because the default switch uses the caller’s 30-second budget, while the early start signal does not guarantee actual pool-wait contention.

1 open issue
What changed in this PR

Backports recent test quarantines and stability fixes to release/8.0, improving SqlClient test reliability without changing production behavior, public APIs, dependencies, or pipelines.

Changes:

  • Quarantines selected manual tests and the pooled-reset budget theory while preserving their assertions, inputs, and platform conditions.
  • Aligns instrumentation checkout timeouts and adds a held-slot regression test.
  • Waits for virtual timer registration before advancing time; repaired tests retain flaky and gain probation.
File Description
src/​Microsoft.Data.SqlClient/​tests/​UnitTests/​Utilities/​NotifyingTimeProvider.cs Adds notification after virtual timer registration.
src/​Microsoft.Data.SqlClient/​tests/​UnitTests/​SimulatedServerTests/​IsolationLevelResetTests.cs Quarantines the pooled-reset budget theory.
src/​Microsoft.Data.SqlClient/​tests/​UnitTests/​ConnectionPool/​DbConnectionPoolInstrumentationTest.cs Aligns checkout budgets, adds held-slot coverage, and marks probation.
src/​Microsoft.Data.SqlClient/​tests/​UnitTests/​ConnectionPool/​ChannelDbConnectionPoolTest.cs Synchronizes timer registration and bounds waits; adds cleanup and probation.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​TracingTests/​EventSourceTest.cs Quarantines listener enumeration failures.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​SqlSchemaInfoTest/​SqlSchemaInfoTest.cs Quarantines synchronous and asynchronous schema theories.
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 concurrency coverage.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​ConnectivityTests/​ConnectivityTest.cs Quarantines the asynchronous no-retry timing test.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​ConnectionTestWithSSLCert/​CertificateTest.cs Quarantines the good-certificate connection test.
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​DDBasics/​DDAsyncTest/​DDAsyncTest.cs Quarantines the test with concurrent shared-list writes.

Review effort: Balanced

@paulmedynski paulmedynski changed the title Tests: Backport recent quarantines and stability fixes to 8.0 [8.0 Backport recent quarantines and stability fixes Nov 23, 2026
@paulmedynski paulmedynski changed the title [8.0 Backport recent quarantines and stability fixes [8.0] 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 69.95%. Comparing base (3702b3f) to head (8c6fbe1).
⚠️ Report is 4 commits behind head on release/8.0.

Additional details and impacted files
@@               Coverage Diff               @@
##           release/8.0    #5132      +/-   ##
===============================================
- Coverage        74.60%   69.95%   -4.65%     
===============================================
  Files              313      313              
  Lines            45804    69738   +23934     
===============================================
+ Hits             34170    48786   +14616     
- Misses           11634    20952    +9318     
Flag Coverage Δ
CI-SqlClient ?
sqlclient-pr 69.95% <ø> (?)

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.

Pin the legacy pool-wait regression policy, observe parked checkout, propagate handler I/O failures, and require a failed physical connection plus configurable retry. Preserve quarantine and adapt TLS stall teardown.

Co-authored-by: Copilot <[email protected]>
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

The summary, backport provenance, and validation scope omit expanded sync/async retry coverage and simulator transport/TLS and lifecycle repairs, whose results need distinguishing from the five reported pool cases.

1 open issue
1 resolved since last review

Review effort: Balanced

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

Shutdown does not drain and observe both waiter tasks, allowing them to outlive owner disposal and leaving a late successful checkout unreturned.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Medium severity Drain caller tasks and return late successful checkout on shutdown

src/​Microsoft.Data.SqlClient/​tests/​UnitTests/​ConnectionPool/​ChannelDbConnectionPoolTest.cs:2561

Shutdown() wakes waiters but does not wait for callerATask or callerBTask to finish, so a failed readiness/completion bound can leave them running past owner disposal. If caller B succeeds just after its bound, resultB is still null and its checkout is never returned. After shutdown, boundedly drain both tasks, observe their faults, and return any successful result from callerBTask before clearing the pool.

Review effort: Balanced

@paulmedynski paulmedynski changed the title [8.0] Backport recent quarantines and stability fixes [8.0] Tests: Backport recent quarantines and stability fixes Nov 24, 2026
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 combined synchronous and asynchronous retry coverage conflicts with mandatory test-authoring rules.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

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\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems.

Projects

Status: To triage

Development

Successfully merging this pull request may close these issues.

2 participants