Skip to content

Quarantine intermittent async test list-write failure - #5129

Merged
paulmedynski merged 1 commit into
mainfrom
dev/mdaigle/sqlclient-flaky-quarantine-20
Nov 23, 2026
Merged

paulmedynski merged 1 commit into
mainfrom
dev/mdaigle/sqlclient-flaky-quarantine-20

Conversation

@mdaigle

@mdaigle mdaigle commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

🤖 This pull request was created by a fully automated workflow.

Description

Quarantine the unparameterized Fact Microsoft.Data.SqlClient.ManualTesting.Tests.DDAsyncTest.ExecuteCommand_WithNewConnection_ShouldPerformAsyncByDefault with one method-level [Trait("category", "flaky")] and an observed-error comment. One Fact per net462/net10.0 moves to quarantine; test bodies, conditions, Set=3, other categories and the shared-connection sibling remain unchanged. No product, API, documentation/localization or pipeline changes.

Eligibility: two async helpers append to the same unsynchronized List<string>. CI failed inside List<T>.Add in both helpers; the unchanged Fact passed in a separate comparable job. That concrete test-owned collection weakness, not a generic connection timeout or successful retry, supports quarantine.

Outcome Exact build / run / result Observed UTC Revision
FAIL: AggregateException with IndexOutOfRangeException from List.Add 190480 / 3689489 / 100261 2026-11-09 15:19:13.460–.473Z d8e6af882ca2
PASS: exact same Fact, separate build/job 190497 / 3689574 / 100211 2026-11-09 16:37:29.397–.403Z 3889617013fe

Both are main-targeted PR jobs: Windows Server 2022/net462/native SNI/Debug/Project, localhost Set 123, attempt 1, image 39.0.0. The test and matrix/job blobs are identical; intervening changes concern documentation validation and unrelated vector tests.

Complete collapsed evidence record, including exact identities, job/log mappings, outcome reconciliation, commands and unfinished branch coverage. Build interval: 2026-11-09T14:02:42.897Z–2026-11-23T14:02:42.897Z; 481 builds enumerated, but full-window per-test coverage remains incomplete and checkpoint is not advanced. Release/6.1, /7.0, /7.1 and /8.0 were included in inventory; no qualifying release pair supports Hotfix routing. Fixes and probation are outside scope.

Issues

Related discovery/context: #5128, #5127, #5125, #5118, #5095. No equivalent pending DDAsync quarantine was found; no unrelated PRs are modified.

Testing

For each $f in net462, net10.0, these exact command forms were run:

$p = 'src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTests.csproj'
$n = 'FullyQualifiedName=Microsoft.Data.SqlClient.ManualTesting.Tests.DDAsyncTest.ExecuteCommand_WithNewConnection_ShouldPerformAsyncByDefault'
dotnet test $p --no-restore --framework $f -p:ReferenceType=Project --list-tests --filter "$n&category=flaky" --verbosity quiet
dotnet test $p --no-restore --no-build --framework $f -p:ReferenceType=Project --list-tests --filter "$n&category!=failing&category!=flaky&category!=interactive" --verbosity quiet
dotnet test $p --no-restore --no-build --framework $f -p:ReferenceType=Project --filter "$n&category=flaky" --verbosity quiet

Results per framework: build/quarantine discovery passed (one Fact); ordinary exclusion passed (zero selected, not execution coverage); execution skipped 1 / passed 0 because SQL setup is not configured. The ordinary sibling remains selected on both frameworks. Initial NETSDK1004 was resolved by dotnet restore $p -p:ReferenceType=Project --verbosity quiet (passed). git diff --check passed. No stability or repair claim; full commands, outcome reconciliation and limitations are in the evidence comment.

Guidelines

Please review the contribution guidelines before submitting a pull request:

@mdaigle
mdaigle requested a review from a team as a code owner November 23, 2026 14:12
Copilot AI balanced review requested due to automatic review settings November 23, 2026 14:12
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Nov 23, 2026
@mdaigle mdaigle added the Area\Tests Issues that are targeted to tests or test projects label Nov 23, 2026
@mdaigle

mdaigle commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor Author
Quarantine evidence and incomplete discovery checkpoint - 2026-11-23

Supported category-only transition

Exact unparameterized Fact:
Microsoft.Data.SqlClient.ManualTesting.Tests.DDAsyncTest.ExecuteCommand_WithNewConnection_ShouldPerformAsyncByDefault.

Add one method-level [Trait("category", "flaky")] and an immediately preceding
observed-error comment. One Fact per supported framework (net462/net10.0) moves
to the existing quarantine selection. Preserve Set=3, conditions, test bodies,
all other categories, and the shared-connection sibling. No repair, probation,
product, API, dependency, pipeline or automation changes.

Verified failure and actual passing control

Both executions are sqlclient-pr (definition 2281), main-targeted
refs/pull/5025/merge revisions. They are separate build/job allocations, not
retries. These are main-derived PR controls, not a release/main comparison.

Outcome Exact build / run / result Revision Observed UTC start - end
Failed: AggregateException containing two IndexOutOfRangeException failures at List.Add 190480 / 3689489 / 100261 d8e6af882ca2683a10ad627c335aad3360fc7d58 2026-11-09T15:19:13.460Z - 15:19:13.473Z
Passed: exact same Fact 190497 / 3689574 / 100211 3889617013fec1eb73f115df193059b33dc0b1d5 2026-11-09T16:37:29.397Z - 16:37:29.403Z

Individual public result detail responses were HTTP 200 JSON and matched result
ID, testRun ID, build ID, exact test name and outcome. Both had empty subResults:
there are no collapsed parameterized cases in this transition.

Comparable configuration: Windows Server 2022, OS 10.0.20348, net462/native SNI,
Debug/Project, ordinary manual Set 123, localhost configuration, no enclave suite,
attempt 1 throughout. Both jobs used runner image 20261025.346.1,
ADO-MMS25-SQL25 version 39.0.0, Standard_D2a_v4. Different agent allocations
are the meaningful execution difference. SQL setup and Northwind initialization
completed in both jobs. The historical matrix sets isLocalServer=true,
enableLocalDB=false, supportsIntegratedSecurity=false; the TCP endpoint is
supplied by the existing localhost pipeline variable, not a loopback proxy.
Secret variable values were not requested or copied. Eligibility below does not
depend on assuming a local endpoint from a job label.

The test file blob is identical in both CI revisions and current main
ce73774d14b2d192391f00ad4859b085f4b802f1:
565aad8e0e14dd9a431de44289b7bb4db16e7c86.
The historical test-stage matrix blob is also identical:
ce4c5c32f8e2911b653da55129f0adcea35e1102; manual job template blob:
d17d0e8b0360539ed69c665be5814d03a66570d2.
The revision comparison changes XML-documentation validation/build orchestration
and unrelated vector category tests, not DDAsyncTest, its helper, or driver
execution code. No intervening repair of this test explains the pass.

Unique run/job/task/log mapping

Run metadata verified the expected build and definition plus:

  • stage test_windows_net462, attempt 1:
    96eca66d-9c2a-5aa4-e7b7-bf51abe43cbb;
  • phase test_windows_net462_localhost_123_sqlclient_manual, attempt 1:
    27f0b3a3-de40-52f5-bbe3-9554412b4f9a;
  • job __default, attempt 1:
    3bc8dfc1-23b5-58aa-5352-2c68df04f347;
  • ordinary task Test: SqlClientManual 123, attempt 1:
    d3c87d0a-24b2-5be4-56a5-d972534f47bd.

Timeline identifier matches were unique and parentId links connected this chain.

Build/job logs Authenticated MCP log IDs and inspected ranges
190480 mapped test task Test log 502, lines 1-135; Initialize job 76, lines 1-70; Generate config 321, lines 1-45; Northwind setup 313, lines 1-40
190497 mapped test task Test log 511, lines 1-45; Initialize job 61, lines 1-70; Generate config 247, lines 1-45; Northwind setup 231, lines 1-40

The failing log confirms Task.WaitAll propagated two helper exceptions, both
inside List<T>.Add, at the collection append in
ExecuteCommandWithNewConnectionAsync. This is not a SQL connection timeout.

Concrete test-specific weakness

Current upstream source
creates one List<string>, passes it to two concurrently outstanding async
helpers, and appends after asynchronous reader operations without locking or
another collection-ownership mechanism. Both helper stacks failing in List.Add
match that concrete unsynchronized test-harness write weakness. A separate
comparable job passed the unchanged Fact.

Generic Azure SQL/network unavailability is not the better explanation for two
IndexOutOfRangeException failures originating at the test-owned list append,
after connections and readers had already been acquired. Agent scheduling may
expose the race but does not make an unsynchronized List safe. The failing run's
only Failed result is this Fact; 1,356 results passed. This is sufficient
test-specific eligibility, not a complete root-cause diagnosis or a claim that
the behavior has been repaired. No retries were implemented or recommended to
hide this collection failure.

Outcome reconciliation and coverage boundary

Discovered run/result identities were deduplicated by build/run/result ID, never
by display title. Authenticated get_results pages used top=500 and explicit
outcome filters. Relevant run totals reconcile exactly:

Build / run Passed pages (skip / returned) Other outcomes Total / distinct result IDs
190480 / 3689489 0/500, 500/500, 1000/356 Failed 1; NotExecuted 113 1,470 / 1,470
190497 / 3689574 0/500, 500/500, 1000/355 NotExecuted 112; Failed/Aborted 0 1,467 / 1,467

These match the server runStatistics entries (including all outcome counts,
without overwriting duplicate keys) and totalTests. NotExecuted is never a pass.
The responses did not supply resultMetadata entries for these controls; no
flaky/retry metadata was inferred. The sibling Fact also has actual passing
results 190480/3689489/100411 and 190497/3689574/100345; no sibling quarantine
is proposed without its own qualifying failure.

This establishes result-outcome enumeration for these two runs and full relevant
Fact detail, not recursive enrichment of every other test or complete interval
coverage. Additional build-helper discovery inspected 190473 (successful,
Failed/Aborted empty), 190588 (release/7.0), 194313 (main), and 194386
(release/7.1). Successful 190497 was explicitly inspected for actual passes.

Inspected interval, inventory and deduplication

Interval: 2026-11-09T14:02:42.897Z through 2026-11-23T14:02:42.897Z.
No trustworthy fully processed tagging checkpoint was available. In particular,
the latest prior tagging record
explicitly does not advance its checkpoint. Therefore this run rescanned the
14-day build window, rather than treating a fix/probation record as discovery
progress.

All completed scoped builds, without a branch or result restriction, were
enumerated in authenticated MCP bounded pages of 50/100 until no continuation
token remained: 481 distinct builds. Outcomes included success, failure,
partial success and cancellation; enumeration alone is not per-test coverage.

Definition Verified live name / status Completed builds
2281 sqlclient-pr / Enabled 203
2300 sqlclient-ci-package / Enabled 29
2309 sqlclient-ci-unit / Enabled 0
1879 CI-SqlClient / Enabled 116
1917 CI-SqlClient-Package / Enabled 71
2197 PR-SqlClient-Project / Enabled 45
2198 PR-SqlClient-Package / Enabled 17

sqlclient-ci-stress (2250) was verified Disabled and excluded. Definitions were
not changed, and no validation builds were manually queued.

All open PR titles and relevant category/fix bodies were read for overlap,
including #5128,
#5127,
#5125,
#5119,
#5118,
#5117,
#5095, and
#5087.
Exact DDAsyncTest proposal search and the related human async proposal
#4435 did not identify an
equivalent pending category or list-ownership repair. Merged main category/fix
history was inspected; #4980
and #4996 are live-verified MERGED
historical inputs, not pending blockers. Protected #5047 was not edited.

Unconfirmed candidates and branch-specific unfinished work

Candidate / branch Observed evidence Decision / unfinished evidence
Microsoft.Data.SqlClient.ManualTesting.Tests.SplitPacketTest.OneByteSplitTest, main Individually verified Failed 194313 / 3754184 / 101536, SHA ce73774d14b2d192391f00ad4859b085f4b802f1, 2026-11-23T01:33:05.993Z-01:33:21.523Z, pre-login handshake timeout (15,022 ms) Not tagged: exact passing control, unique job/config mapping and test-specific versus shared-connectivity distinction unfinished. A timeout alone is insufficient. A bounded transient setup retry is only a possible separate-fixes investigation after establishing that setup, rather than the tested behavior, is transient; no repair proposed here.
Microsoft.Data.SqlClient.ManualTesting.Tests.AlwaysEncrypted.ApiShould.TestEnclaveExecutionApis, main Build-helper failures in 194313, runs 3754203/3754205, including 101694 with invalid XML result Not tagged: product behavior is a credible explanation; related #5117/#5085 already discuss it. Truncated connection arguments and grouped details do not establish exact-case intermittency. Recursive detail and passing comparisons unfinished.
Microsoft.Data.SqlClient.ManualTesting.Tests.DistributedTransactionTestWindows.Test_EnlistedTransactionPreservedWhilePooled, release/7.1 Build 194386 discovery includes 26 failures setting TransactionManager.ImplicitDistributedTransaction after initialization Not tagged: no verified same-branch passing control or complete configuration/source comparison; could be deterministic lifecycle/platform behavior.
Microsoft.Data.SqlClient.ManualTesting.Tests.DiagnosticTest.ConnectionOpenAsyncErrorTest and neighboring diagnostic tests, release/7.0 Build 190588/run 3690729/result 101785 discovery shows missing Microsoft.Data.SqlClient assembly in RemoteExecutor child; many neighboring diagnostic failures share that signature Not tagged: broad assembly-loading/setup failure is not established intermittent test-specific weakness. No passing-control verification; details/mappings unfinished.

CI-SqlClient branch inventory, discovered from build metadata and checked against
live upstream release refs:

Branch Definition 1879 builds Reviewed / unfinished
main 43 Main-derived DDAsync Fact pair fully verified; latest main helper discovery and OneByte result inspected. Most other builds/runs/cases remain unprocessed.
release/6.1 7 Build inventory only; per-test evidence unfinished.
release/7.0 6 Build 190588 failure discovery above; remaining per-test detail/passes unfinished.
release/7.1 22 Build 194386 failure discovery (160 records); no DDAsync failure in that response, which is not a branch-wide absence or pass claim. Other failures/passes unfinished.
release/8.0 21 Build inventory, including cancellation; per-test evidence unfinished.

No release branch has a verified same-branch DDAsync failure/pass pair from this
run. No Hotfix version label is justified or applied; backport routing is
unrequested, not completed. Release passes were never substituted for main
passes. Existing release backport/category proposals were used for context only.
No manual backport PR was opened.

Local validation commands and results

Commands ran only in this automation's isolated worktree. Initial baseline
discovery failed NETSDK1004 because project.assets.json was absent:

dotnet test src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTests.csproj --no-restore --framework net462 -p:ReferenceType=Project --list-tests --filter 'FullyQualifiedName=Microsoft.Data.SqlClient.ManualTesting.Tests.DDAsyncTest.ExecuteCommand_WithNewConnection_ShouldPerformAsyncByDefault' --verbosity quiet

Missing assets were restored using the existing configured feeds/accounts:

dotnet restore src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTests.csproj -p:ReferenceType=Project --verbosity quiet

PASSED. No dependency/version/source-feed changes.

Subsequent exact command forms, each evaluated for net462 and net10.0:

$p = 'src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTests.csproj'
$n = 'FullyQualifiedName=Microsoft.Data.SqlClient.ManualTesting.Tests.DDAsyncTest.ExecuteCommand_WithNewConnection_ShouldPerformAsyncByDefault'
dotnet test $p --no-restore --framework $f -p:ReferenceType=Project --list-tests --filter "$n&category=flaky" --verbosity quiet
dotnet test $p --no-restore --no-build --framework $f -p:ReferenceType=Project --list-tests --filter "$n&category!=failing&category!=flaky&category!=interactive" --verbosity quiet
dotnet test $p --no-restore --no-build --framework $f -p:ReferenceType=Project --filter "$n&category=flaky" --verbosity quiet

Results on each framework: compilation/discovery PASSED and selected exactly
one intended Fact for quarantine; ordinary exclusion PASSED with zero selected;
execution SKIPPED 1, PASSED 0, FAILED 0 because SQL connection setup was not
configured. Zero selection is an exclusion check, not execution coverage.
Skipped-only execution is explicitly not a passing control or stability claim.
The build generated the default local config; no credentials were supplied.

Sibling preservation, each framework:

$n = 'FullyQualifiedName=Microsoft.Data.SqlClient.ManualTesting.Tests.DDAsyncTest.ExecuteCommand_WithSharedConnection_ShouldPerformAsyncByDefault'
dotnet test $p --no-restore --no-build --framework $f -p:ReferenceType=Project --list-tests --filter "$n&category!=failing&category!=flaky&category!=interactive" --verbosity quiet

PASSED, exactly one ordinary sibling selected per framework.
git diff --check PASSED. The diff adds exactly the symptom comment and flaky
attribute, with no changed test body.

Upstream build.proj ordinary defaults exclude category=flaky; existing common
quarantine tasks select category=flaky, with continueOnError enabled. No filters
or pipeline definitions changed. Category validation does not establish a repair
or a stable test.

Errors, publication metadata and checkpoint

Two historical test-stage file lookups returned HTTP 404 because the guessed
singular filename was wrong; corrected test-stages.yml reads succeeded.
A local git revision comparison initially lacked historical PR-merge objects;
the same-origin GitHub comparison/content APIs supplied the revisions and
identical blobs. No account/repository switching or access bypass was used.
The initial missing-assets error was corrected by restore. Local SQL execution
remains unavailable; no passing execution is claimed.

Latest canonical upstream main version: 8.1.0-preview1; matching existing
OPEN milestone #108. The temporary 8.0.0-preview1 exclusion does not apply.
Live publication checks PASSED for the existing Area\Tests label, assigned
milestone 8.1.0-preview1, and exact fully automated disclosure as the first
description line. Source and target repositories are both dotnet/SqlClient,
source dev/mdaigle/sqlclient-flaky-quarantine-20, target main.
Published commit: ea32d67aa6fb29a14e59155d8b1ff3a3ff8584b8.
The live PR diff is exactly one file, two additions and zero deletions; the
description links this single collapsed record. No other PR, including #5047,
is modified. Both milestone checks passed; automatically triggered sqlclient-pr
and code scanning were still pending/in progress at publication verification.
No build was manually queued, no approval or merge was performed, and auto-merge
was not enabled. There is no outstanding publication/label/milestone error.

CHECKPOINT NOT ADVANCED. The 481-build inventory is complete for the
stated completed-build interval, but most per-test pagination/detail,
passing-control and branch-specific configuration work is unfinished. The
supported Fact pair is not permission to skip that evidence next run. Rescan
the next run's 14-day window and deduplicate against this record unless a later
fully processed tagging record establishes a reliable checkpoint.

Fixes, probation, promotion, category removal, merging and auto-merge are outside
this automation's scope.

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 block the narrowly scoped quarantine of one intermittent manual test.

No open issues 🎉

What changed in this PR

Quarantines one intermittent SqlClient manual test without changing test logic or product behavior.

Changes:

  • Adds a method-level flaky category to ExecuteCommand_WithNewConnection_ShouldPerformAsyncByDefault, moving it out of ordinary test runs.
  • Adds a comment recording the observed List<T>.Add exception; existing conditions, categories, and sibling tests remain unchanged.

Reported discovery checks verified routing on both target frameworks. Execution was skipped because SQL setup was unavailable; no stability claim is made.

File Description
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​DDBasics/​DDAsyncTest/​DDAsyncTest.cs Adds the quarantine trait and observed-error comment to one test.

Review effort: Balanced

@paulmedynski
paulmedynski enabled auto-merge (squash) November 23, 2026 14:22
@paulmedynski
paulmedynski merged commit 51da3ab into main Nov 23, 2026
50 of 51 checks passed
@paulmedynski
paulmedynski deleted the dev/mdaigle/sqlclient-flaky-quarantine-20 branch November 23, 2026 15:02
@github-project-automation github-project-automation Bot moved this from To triage to Done in SqlClient Board 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 70.45%. Comparing base (17bef7b) to head (ea32d67).
⚠️ Report is 34 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5129      +/-   ##
==========================================
+ Coverage   68.99%   70.45%   +1.46%     
==========================================
  Files         314      315       +1     
  Lines       45857    70150   +24293     
==========================================
+ Hits        31638    49425   +17787     
- Misses      14219    20725    +6506     
Flag Coverage Δ
CI-SqlClient ?
sqlclient-pr 70.45% <ø> (?)

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.

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

Development

Successfully merging this pull request may close these issues.

5 participants