Skip to content

[System.Net.Security] Isolate TLS resumption test credentials - #135689

Closed
tannergooding wants to merge 2 commits into
dotnet:mainfrom
tannergooding:tannergooding-tls-resumption-fix
Closed

tannergooding wants to merge 2 commits into
dotnet:mainfrom
tannergooding:tannergooding-tls-resumption-fix

Conversation

@tannergooding

@tannergooding tannergooding commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Fixes #133418

On Windows, run DifferentEncryptionPolicy_NoResume in a child process so other TLS tests cannot evict its cached Schannel credentials between the initial handshake and the required resumption. The existing assertions and Linux path are unchanged.

Validation: A controlled x86 cache-churn experiment reproduced the failure before isolation and passed afterward. Before merging current upstream main, 35 targeted tests passed; the System.Net.Security suite had 5,310 tests, 0 failures, and 28 skips. Per request, tests were not rerun after the merge; the attempted build stopped before test execution because the local shared framework/targeting pack was unavailable. Windows Server 2016 validation remains outstanding.

Note

This PR description was prepared with GitHub Copilot.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 4 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/ncl, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.

@tannergooding

Copy link
Copy Markdown
Member Author

This "should" help with the test flakiness.

@rzikm

rzikm commented Oct 13, 2026

Copy link
Copy Markdown
Member

Maybe we should do this for all tests in the test class, that rely on the session cache being in a particular state

@wfurt

wfurt commented Oct 13, 2026

Copy link
Copy Markdown
Member

Maybe we should do this for all tests in the test class, that rely on the session cache being in a particular state

or run them in the non-parallel set? There is still cache inside schannel that we cannot control.

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

The focused test-only change follows existing process-isolation patterns without altering assertions or non-Windows behavior.

0 open findings

What changed in this PR

Isolates the Windows TLS resumption test from process-wide Schannel credential-cache interference.

Changes:

  • Runs the Windows test through RemoteExecutor.
  • Preserves the existing Linux and unsupported-host path.
File Description
SslStreamAllowTlsResumeTests.cs Extracts test logic and adds Windows process isolation.

🧠 Review effort: Balanced

adamsitnik
adamsitnik previously approved these changes Oct 14, 2026

@adamsitnik adamsitnik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change LGTM, I leave it up to @tannergooding to decide whether he wants to change other tests or keep the PR focused on this particular flaky test.

@rzikm

rzikm commented Oct 14, 2026

Copy link
Copy Markdown
Member

Replaced by #135751

@rzikm rzikm closed this Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SslStreamTlsResumeTests.DifferentEncryptionPolicy_NoResume failing

6 participants