Skip to content

Quarantine intermittent good-certificate setup test - #5038

Merged
mdaigle merged 1 commit into
mainfrom
dev/mdaigle/sqlclient-flaky-quarantine-727
Nov 16, 2026
Merged

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

Conversation

@mdaigle

@mdaigle mdaigle commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

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

Description

Add only [Trait("category", "flaky")] to:

Microsoft.Data.SqlClient.ManualTesting.Tests.CertificateTest.OpeningConnectionWithGoodCertificateTest

Its certificate setup exceeded the existing 60-second timeout, then the exact test passed on the same-revision, same-job retry and in another job. This method-level category moves one fact into existing quarantine; all bodies, other categories, sibling methods and pipelines remain unchanged.

Observation Result Build / revision Observed UTC Configuration
Failed setup 3697163/101425 191140 / 27b419c7cf39 2026-11-11 13:52:19.657 Windows Server 2025, SQL Server 2025 named instance, net10.0, native SNI
Passed retry 3697163/101490 Same 2026-11-11 13:55:47.977-13:56:00.950 Same job/configuration
Passed other job 3697141/101399 Same 2026-11-11 13:51:25.010-13:52:03.540 Same OS/framework/SNI; default SQL instance

Quarantine isolates an intermittent test-owned certificate/service setup timeout, not a confirmed driver defect or repair. The same named-instance retry passing rules out treating the instance difference alone as a deterministic failure.

Full evidence, exact validation commands/results and unfinished coverage: collapsed run record.

Issues

Related: #5021 quarantined the distinct OpeningConnectionWithNicTest; #4980, #4996 and #5028 are prior discovery records, not duplicate proposals. No issue is closed.

Testing

Both net10.0 and net462 compiled. Actual xUnit/VSTest discovery selected this fact plus the existing NIC quarantine control with category=flaky; the ordinary filter selected only the unquarantined RemoteCertificateNameMismatchErrorTest control. Exact commands and outputs are in the linked evidence record.

No certificate test body was executed locally: its administrative setup writes machine certificate stores/registry and restarts SQL Server in this shared environment. Discovery is category validation, not passing execution or stability evidence. Two CI run inventories (7,955 results) were reconciled; broader per-test coverage remains incomplete after a build-wide Passed query transport failure. The discovery checkpoint is not advanced.

  • Tests added or updated - one category only
  • Public API changes documented - no API changes
  • Verified against customer repro (if applicable) - CI-only intermittency
  • Ensure no breaking changes introduced - no product or test-body changes

Guidelines

Please review the contribution guidelines before submitting a pull request:

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

mdaigle commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author
Quarantine evidence, category validation and incomplete discovery checkpoint - 2026-11-11

Exact test, reason and scope

Microsoft.Data.SqlClient.ManualTesting.Tests.CertificateTest.OpeningConnectionWithGoodCertificateTest is a nonparameterized fact. Add one method-level [Trait("category", "flaky")]; preserve its Set=1, Windows and conditional prerequisites, all sibling methods, all other categories and every test body. No class-level expansion, root-cause repair, probation transition, category removal, pipeline change or queued validation build.

The failure occurs in CertificateTest.CreateValidCertificate called by the constructor, before the test body. The helper's existing 60-second WaitForExit limit expired. Output records successful certificate creation/import but not script completion; the script subsequently configures SQL Server certificates/encryption and restarts the SQL service. This supports a test-owned setup timeout, not a particular repaired root cause. Only this test failed in the initial 49-test ordinary invocation (45 passed, 3 skipped); the retry had 46 passes and 3 skips. There is no observed broad shared-infrastructure failure in that invocation. Do not equate this evidence with proving all infrastructure healthy.

The same exact named-instance case passed immediately on the same job/task retry without a code/configuration change. A separate default-instance job at the same revision also passed. This is stronger than contrasting platforms or treating job success as a test pass. The method is quarantined, not declared stable or fixed.

Verified results and configurations

All three observations are in PR-SqlClient-Project / definition 2197, build 191140 / 31501, revision 27b419c7cf397b46f374f74af63d3f794648423f, source refs/pull/5036/merge. Both jobs use Windows Server 2025, SQL Server 2025, net10.0, AnyCPU/x64 process, native SNI, Debug, Project references, manual set 1, SqlClient package version 8.0.0-pr.31501. They are local SQL jobs, not Azure SQL/enclave jobs. The evidence revision's eng/pipelines/dotnet-sqlclient-ci-core.yml lines 465-545 confirms ADO-MMS25-SQL25 versus ADO-MMS25-SQL25-WITH-NAMED-INSTANCE, local configuration and different default/instance connection-variable references; no credential values were retrieved.

Observation Exact run/result Observed UTC Meaningful difference
Failed 3697163/101425 2026-11-11T13:52:19.657Z (start=end in stored result; not actual setup duration) Win25_Sql25_Named_Instance; constructor timed out
Passed 3697163/101490 2026-11-11T13:55:47.977Z to 13:56:00.950Z Same named-instance job, first internal task retry, 12,973 ms
Passed 3697141/101399 2026-11-11T13:51:25.010Z to 13:52:03.540Z Win25_Sql25; default instance, 38,530 ms

Authenticated MCP discovered the failed run/result. The build-wide Passed helper failed with MCP server 'azure-devops': MCP request failed: Transport closed. Mapped authenticated publish-result log 2271 identified control run 3697141; authenticated per-run pagination supplied the actual passing result. Read-only public single-run and single-result SubResults endpoints returned HTTP 200 / JSON, with matching run/build/result IDs and outcomes. All candidate result details include the exact automated name, no grouped parent and empty subResults; no truncated parameter identity or mixed-parent inference is involved.

git fetch origin 27b419c7cf397b46f374f74af63d3f794648423f --quiet succeeded. git diff --stat 27b419c7cf397b46f374f74af63d3f794648423f origin/main -- src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectionTestWithSSLCert was empty at upstream main d8a60de2fc498c34d6da12f360fd6efeb32ee7c5. Thus no intervening certificate-source repair explains these controls.

Unique timeline/job/task mapping

Run details identify stage/phase/job names and attempts. Build 191140's timeline uniquely matches the following ancestry; every stage, phase and job attempt is 1:

Run Stage / phase / job identifiers
3697163 Win25_Sql25_Named_Instance: 07a400c2-ced3-5f3f-a683-c145166ee37e / net10_0_AnyCPU_NativeSNI_1: a041f826-e1c4-53d3-5b4e-4e15358ead49 / __default: 636d900e-1a10-52e5-c6ec-e384b9edd774
3697141 Win25_Sql25: b30ceaf8-5b92-587d-23b9-301e8c14ed73 / net10_0_AnyCPU_NativeSNI_1: 44a21cad-b71a-5e8f-ea54-8e8c9412a294 / __default: ca672acb-afd8-5793-b327-53ec8f0bb784

Mapped, bounded authenticated MCP log reads:

Purpose Log / task link Retrieved lines
Named-instance ordinary failure and retry 2171 / Run Manual Tests x64 1-130 and 130-260
Named-instance run publication 2485 / Publish Test Results 1-55; explicitly publishes 4,002 results to 3697163
Default-instance ordinary control 1969 / Run Manual Tests x64 1-100
Default-instance run publication 2271 / Publish Test Results 1-100; explicitly publishes 3,953 results to 3697141
Named-instance config task 1316 / Update config.jsonc 1-85; no configuration contents printed
Later named-instance quarantine task 2475 / Run Flaky Manual Tests x64 1-24

Ordinary expanded selector: ((category!=failing&category!=flaky&category!=interactive)&category!=signed)&(Set=1). The internal task retry starts at 13:54:14Z with the same command; it is not a new job attempt. All candidate timestamps precede the separate quarantine task starting at 13:57:38Z, whose command explicitly uses TestFilters=category=flaky and TestCodeCoverage=false. No artifact download was necessary for these exact identities/configurations.

Reconciled per-run coverage

Authenticated testplan_test_run calls used no outcome exclusion, detailsToInclude=SubResults, skip/top pagination in 1,000-result pages:

Run Page counts Unique (buildId,runId,resultId) records Passed Failed NotExecuted Server total
3697163 1000 + 1000 + 1000 + 1000 + 2 4,002 3,968 1 33 4,002
3697141 1000 + 1000 + 1000 + 953 3,953 3,923 0 30 3,953

Short final pages terminate enumeration. IDs were checked for uniqueness. Stored runStatistics arrays reconcile to these totals; duplicate outcome keys are summed rather than overwritten, and neither run has resultMetadata entries to discard. The 63 NotExecuted results are not passes. Complete enumeration of these two run inventories does not imply causal investigation of every noncandidate result or complete coverage of either build.

Inspected interval and incomplete coverage

Prior tagging records, including #4980, #4996, #5021 and #5028's discovery record, do not establish a reliable fully processed discovery checkpoint. Therefore this run rescanned completed-build finish times 2026-10-28T15:52:36Z through 2026-11-11T16:52:36Z (the previous 14 days plus one additional hour). No branch/result exclusions.

Live authenticated definition identity/queue status checks preceded discovery:

Definition Verified name/status Inventoried completed builds
2281 sqlclient-pr / Enabled 171
2300 sqlclient-ci-package / Enabled 23
2309 sqlclient-ci-unit / Enabled 0
1879 CI-SqlClient / Enabled 102
1917 CI-SqlClient-Package / Enabled 54
2197 PR-SqlClient-Project / Enabled 160
2198 PR-SqlClient-Package / Enabled 9

Definition 2250 / sqlclient-ci-stress / Disabled was rechecked and excluded. No unscoped pipelines were used.

Build pagination used Completed / FinishTimeAscending, bounded pages 50 + 100 + 100 + 100 + 100 + 69 = 519 unique builds, terminal page without a continuation token. Totals: 135 Succeeded, 199 Failed, 176 PartiallySucceeded, 9 Canceled. Earliest returned finish: 186745, 2026-10-28T15:58:18.8618006Z; latest: 191140, 2026-11-11T15:07:16.1680458Z. The first cursor was initially passed at whole-second precision; replay with the exact server cursor 2026-10-29T19:39:43.9178911Z returned the same 100 IDs, verifying no page gap. Subsequent cursors retained exact server precision.

Build enumeration is complete; whole-window per-test coverage is incomplete. Current-run failure/aborted/error/timeout discovery used build helpers for 191140 (two failures) and 191146 (empty). Empty failure discovery for 191146 does not establish passing or no-test coverage. Only the two run inventories above are fully paginated/reconciled. Other jobs/runs of 191140, every run of the remaining 518 inventoried builds, and successful/canceled build per-test controls remain unfinished. No whole-build completion or complete list of intermittent tests is claimed.

Unconfirmed candidate and deduplication

Microsoft.Data.SqlClient.ManualTesting.Tests.SplitPacketTest.FullHeaderTest remains unconfirmed and unchanged. Build 191140 / run 3697171 / result 101450 failed at 2026-11-11T13:54:51.073Z to 13:55:06.593Z, with a 15-second pre-login handshake timeout. Exact single-result details verified the same build SHA and identity. Run details identify Win22_Sql19_x86 / net10_0_AnyCPU_NativeSNI_3 / __default, attempt 1; timeline job ec9b9993-1e48-563b-d855-bb468d40fda7 uniquely follows phase b5a91ee8-8d31-56be-4120-d9b50b078da3 and stage 63067434-5946-5d8a-a33a-eb998056dcb4. The ordinary task maps to log 2433, not retrieved. The run has 5,590 server-reported results, but was not paginated/reconciled. Comparable exact passes and network/server/proxy attribution remain unresolved; the parent job succeeding is not a pass. No category was added on this evidence.

All open PR titles/branches and relevant bodies were inspected, and exact candidate-file overlap was rechecked immediately before publication: no equivalent open category/fix proposal for this method. #5021 is merged and tags only OpeningConnectionWithNicTest, a distinct sibling. #3624, merged 2025-09-25T20:58:07Z, historically re-enabled the two certificate methods with Windows/admin prerequisites; it is not an open quarantine proposal. #4980 and #4996 are merged historical inputs. #5028 is merged schema-theory quarantine; its unconfirmed candidates were not inherited as confirmed evidence. #5000 is merged simulator repair, read only for history/context. No fixes/probation record advances discovery.

Local category validation and limitations

Initial exact command:

dotnet test 'src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTests.csproj' -c Debug -f net10.0 --no-restore --list-tests --filter 'FullyQualifiedName~Microsoft.Data.SqlClient.ManualTesting.Tests.CertificateTest.' --verbosity quiet

First attempt failed NETSDK1004, missing this isolated worktree's obj\project.assets.json. Then:

dotnet restore 'src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTests.csproj' --verbosity quiet

Passed. Retrying the first command passed, compiled net10.0 and discovered the three CertificateTest methods.

dotnet test 'src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTests.csproj' -c Debug -f net10.0 --no-build --no-restore --list-tests --filter 'FullyQualifiedName~Microsoft.Data.SqlClient.ManualTesting.Tests.CertificateTest.&category=flaky' --verbosity quiet
dotnet test 'src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTests.csproj' -c Debug -f net10.0 --no-build --no-restore --list-tests --filter 'FullyQualifiedName~Microsoft.Data.SqlClient.ManualTesting.Tests.CertificateTest.&category!=failing&category!=flaky&category!=interactive' --verbosity quiet
dotnet test 'src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTests.csproj' -c Debug -f net462 --no-restore --list-tests --filter 'FullyQualifiedName~Microsoft.Data.SqlClient.ManualTesting.Tests.CertificateTest.&category=flaky' --verbosity quiet
dotnet test 'src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTests.csproj' -c Debug -f net462 --no-build --no-restore --list-tests --filter 'FullyQualifiedName~Microsoft.Data.SqlClient.ManualTesting.Tests.CertificateTest.&category!=failing&category!=flaky&category!=interactive' --verbosity quiet

All four commands passed. Both quarantine selections contain exactly OpeningConnectionWithGoodCertificateTest and the existing OpeningConnectionWithNicTest positive control. Both ordinary selections contain exactly RemoteCertificateNameMismatchErrorTest, an unquarantined positive control, and exclude the candidate. The net462 command compiled that target. git diff --check passed; final tracked diff is one insertion, zero deletions in one file.

These are actual runner discovery/category-routing checks, not local passing executions. No skipped-only or zero-match run is counted as coverage. Local certificate execution was deliberately not attempted because its administrative setup changes machine certificate stores/registry and restarts SQL Server in a shared environment. CI provides the verified actual test executions above. No repair, stability or broad integration-coverage claim.

An optional local Git signing-configuration probe initially exited 1 because values were unset; corrected reads with explicit defaults succeeded (commit.gpgsign=false, gpg.format=openpgp). An extra GitHub history search rejected a malformed embedded repository qualifier; the corrected gh search prs OpeningConnectionWithGoodCertificateTest --repo dotnet/SqlClient --limit 30 --json number,title,state,url succeeded and returned only merged #5021 and #3624. No account/repository switch or signing/access policy bypass occurred.

Publication policy and checkpoint

Upstream main d8a60de2fc498c34d6da12f360fd6efeb32ee7c5 declares SqlClientNextVersion=8.1.0-preview1. Existing OPEN milestone 108 / 8.1.0-preview1 is the exact current target. The one-time exclusion of 8.0.0-preview1 / 101 no longer applies; it was not assigned or replaced by guessing a due date. Required label: existing Area\Tests, one literal backslash. Required visible first line: 🤖 This pull request was created by a fully automated workflow. Source and target remain in dotnet/SqlClient, source dev/mdaigle/sqlclient-flaky-quarantine-727, target main.

Published PR #5038, commit 4f09e662b28b31a7129e699700c4313c49dfdd41. Origin accepted the push. Live GitHub metadata verified the exact disclosure first line, existing Area\Tests label, milestone 108 / 8.1.0-preview1, head/base repository dotnet/SqlClient, base main, and open/unmerged state. The tracked diff remains one category insertion and the worktree is clean. No auto-merge or approval was enabled. GitHub naturally triggered build 191174 and milestone checks on publication; they were still pending when inspected, outside this evidence interval. This automation did not queue a build or claim those checks passed.

Final live verification rechecked the evidence link and exact single-comment contents, disclosure, label, open milestone and one-insertion diff. Upstream's canonical version remained 8.1.0-preview1. The subsequently completed GitHub checks Validate milestone and Check milestone matches next SqlClient version both reported SUCCESS. This does not claim completion of the automatically triggered Azure validation build.

Checkpoint: NOT ADVANCED. The next tagging run must rescan at least the previous 14 days with deduplication unless a later tagging record establishes genuine complete coverage. Fixes, fix PRs, all probation lifecycle work, promotions and flaky-category removals remain 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.

🔵 Needs a closer look

The required review quorum could not be verified because trusted review-policy references and current PR discussion/review threads were unavailable.

No open issues 🎉

What changed in this PR

Quarantines OpeningConnectionWithGoodCertificateTest after an intermittent certificate-setup timeout, using the existing flaky-test mechanism. This isolates the test from ordinary runs without claiming to fix the underlying timeout.

Changes:

  • Adds method-level [Trait("category", "flaky")], alongside the previously quarantined NIC test.
  • Leaves test bodies, sibling methods, existing conditions, and pipelines unchanged.
File Description
src/​Microsoft.Data.SqlClient/​tests/​ManualTests/​SQL/​ConnectionTestWithSSLCert/​CertificateTest.cs Marks the good-certificate connection test as flaky for existing quarantine selection.

Review effort: Balanced

@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.12%. Comparing base (5aaa9ef) to head (4f09e66).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5038      +/-   ##
==========================================
- Coverage   74.02%   69.12%   -4.91%     
==========================================
  Files         313      314       +1     
  Lines       45726    69726   +24000     
==========================================
+ Hits        33848    48195   +14347     
- Misses      11878    21531    +9653     
Flag Coverage Δ
CI-SqlClient ?
sqlclient-pr 69.12% <ø> (?)

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.

@mdaigle
mdaigle enabled auto-merge (squash) November 12, 2026 16:54
@mdaigle
mdaigle merged commit aae8a8b into main Nov 16, 2026
49 of 50 checks passed
@mdaigle
mdaigle deleted the dev/mdaigle/sqlclient-flaky-quarantine-727 branch November 16, 2026 16:11
@github-project-automation github-project-automation Bot moved this from To triage to Done in SqlClient Board Nov 16, 2026
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