Skip to content

[tests] Handle OCSP network failures after certificate validation. Fixes #25444 - #27090

Open
rolfbjarne wants to merge 1 commit into
mainfrom
dev/rolf/tls-test-reliability
Open

rolfbjarne wants to merge 1 commit into
mainfrom
dev/rolf/tls-test-reliability

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

The OCSP tests stopped processing a request as soon as the certificate validation callback ran. A subsequent TLS handshake failure or transient HTTP error therefore bypassed the existing CI network-error handling and failed the test.

Check the request exception and response status before taking the callback early exit. This preserves the certificate-policy and successful-response assertions, while applying the existing CI-only handling regardless of when the connection fails.

Fixes #25444

🤖 Pull request created by Copilot

The OCSP tests stopped processing a request as soon as the certificate validation callback ran. A subsequent TLS handshake failure or transient HTTP error therefore bypassed the existing CI network-error handling and failed the test.

Check the request exception and response status before taking the callback early exit. This preserves the certificate-policy and successful-response assertions, while applying the existing CI-only handling regardless of when the connection fails.

Fixes #25444

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 8aeb06e9-16c7-4a55-84c6-f55cdd4d7d44
Copilot AI balanced review requested due to automatic review settings October 27, 2026 23:29
@rolfbjarne
rolfbjarne requested a review from dalexsoto as a code owner October 27, 2026 23:29

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 were identified for the OCSP test request-handling change.

No open issues 🎉

What changed in this PR

This PR adjusts OCSP test request handling so transient network failures after certificate validation reach the existing CI-only network-error handling, addressing part of the failure pattern reported in #25444.

Changes:

  • Checks request exceptions and HTTP response status before exiting when the certificate-validation callback has run.
  • Preserves the existing certificate-policy and successful-response assertions.
File Description
tests/​monotouch-test/​System.Net.Http/​MessageHandlers.cs Moves the callback early exit after CI network-error checks in the OCSP test.

Review effort: Balanced

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 80ccab9de55a4055782180d82a9f185605083829 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [CI Build #80ccab9] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

1 tests crashed, 1 tests failed, 213 tests passed.

Failures

❌ dotnettests tests (macOS)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.BundleStructureTest.Build(MacOSX,"osx-x64",All,"Re...: '/Users/cloudtest/vss/_work/1/s/macios/tests/dotnet/BundleStructure/macOS/bin/Release/net11.0-macos/osx-x64/BundleStructure.app/...

Html Report (VSDrops) Download

❌ windows tests

🔥 Failed catastrophically on VSTS: test results - windows (no summary found).

Html Report (VSDrops) Download

Successes

✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 1 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 21 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 20 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 20 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 20 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 20 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Golden Gate (27): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

✅ Linux build succeeded

Pipeline on Agent
Hash: 80ccab9de55a4055782180d82a9f185605083829 [PR build]

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI Postmortem] Transient TLS/network failures affecting multiple tests (May 15)

3 participants