Repository navigation
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Missing PR identifiers, base/head SHAs, review history, and trusted immutable supplemental references prevent verification of head freshness, current-head CI, and outstanding feedback resolution.
No open issues 🎉
What changed in this PR
Repairs worker-start synchronization in the connection-pool checkout test, addressing the scheduling dependency behind the quarantined failures without changing production code or APIs.
Changes:
- Runs the checkout worker on a dedicated
LongRunningtask with an explicit startup signal and cleanup that releases and drains the worker. - Adds a single-worker-scheduler regression covering both MARS settings and both pool implementations through typed
MemberData. - Retains the
flakycategory and addsprobationwhile preserving connection-reuse and pool-identity assertions.
| File | Description |
|---|---|
| src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectionPoolTest/ConnectionPoolTest.cs | Repairs worker scheduling and synchronization, adds controlled regression coverage, and marks the repaired theory for probation. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5119 +/- ##
==========================================
+ Coverage 68.99% 72.56% +3.56%
==========================================
Files 314 315 +1
Lines 45857 70982 +25125
==========================================
+ Hits 31638 51505 +19867
- Misses 14219 19477 +5258
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Original failure/control records use source
Build 193677 execution mapping below: x64, Release/Project/Set 3, stage/phase/job/task attempts 1. IDs are ordinary / quarantine parent results; each listed parent has two individually verified Passed children. Run links open the first listed result. UTC bounds are November 19, 2026.
PR build 193679 used merge SHA |
🤖 This pull request was created by a fully automated workflow.
Description
Repair
Microsoft.Data.SqlClient.ManualTesting.Tests.ConnectionPoolTest.MaxPoolWaitForConnectionTest: four non-Synapse TCP inputs, covering MARS on/off andusePoolV2true/false.Demonstrated mechanism: the helper inherits the caller's scheduler while the caller polls synchronously for at most one second. A queued helper need not start within that window. CI recorded
Expected: Running / Actual: WaitingToRunfor both pool versions. A single-worker scheduler deterministically reproduces that assertion; this models the scheduling dependency, not the original agent's exact load.Run the blocking checkout on a dedicated
LongRunningtask usingTaskScheduler.Default, with an explicit startup signal. The 30-second startup bound is a failure safeguard, not a delay. Preserve running/completion, physical-connection and pool-identity assertions; release and drain the worker infinally. AddMaxPoolWaitForConnectionTest_SingleWorkerScheduler_ReusesConnectionusing the same inputs through typedMemberData. No production/API or pipeline changes.Retain
[Trait("category", "flaky")]and add[Trait("category", "probation")]. Ordinary filters exclude the repaired theory, quarantine selects it, and the regression runs ordinarily. Probation begins separately on each upstream branch only when the repair and both traits actually merge there, never on PR creation. Later transitions belong to the independent probation reviewer.Release routing: the same polling defect exists on releases 6.1, 7.0, 7.1 and 8.0. The complete patch applies cleanly to 8.0, whose original test-file blob matches main;
Hotfix 8.0.0is applied. Routing to 6.1.9, 7.0.5 and 7.1.3 is blocked: the older synchronous signatures/providers make the unchanged regression incompatible, requiring a tailored backport. Those labels are deliberately withheld rather than route an unsafe complete diff. Release binaries were not separately executed.Issues
#5105 quarantined this same startup assertion. #1465 previously increased its polling duration without removing the scheduling dependency.
Testing
Local Windows SQL Server, TCP/integrated authentication against
master. Executed net462/native SNI and net10.0/native and managed SNI (UseManagedSNIOnWindows=truefor managed).Results: restore passed; focused Debug and Release runs passed 8 cases per framework/configuration, none skipped. Class run: 18 passed/framework, one Azure-token-only sibling skipped. Quarantine: exactly 4 affected cases passed/framework; ordinary: 12 passed/framework including all 4 regression inputs, with the Azure sibling skipped.
--list-testsverified both selections. With original scheduling restored,dotnet test $p --no-restore --filter 'FullyQualifiedName~MaxPoolWaitForConnectionTest_SingleWorkerScheduler_ReusesConnection' -v:qfailed all 4 inputs/framework; repaired source passed them.CI: scoped 193677 completed at the repair SHA. All 48 affected/regression child results passed across six Windows SQL25/Azure SQL configurations, including existing quarantine steps. The build is partially succeeded, not wholly green: unrelated quarantined vector deadlocks and Linux date/time/distributed-transaction failures remain. Linux's result publisher rejected its files, and the mapped artifact download returned no inspectable content; no Linux quarantine case-level pass is claimed. PR build 193679 succeeded; its Azure SQL regression results additionally passed on Linux/net10.0 and Windows/net462/net10.0. Individual execution records.
Guidelines
Please review the contribution guidelines before submitting a pull request:
Contributing
Code of Conduct
Best Practices
Coding Style
Review Process
Tests added or updated.
Public API changes documented (not applicable: test-only correction).
Verified against customer repro (not applicable: controlled scheduler regression, not the exact CI agent load).
Ensure no breaking changes introduced.