[tests] Diagnose NSUrlSession redirect stalls - #26234
Conversation
Refactor the redirect credential tests through a shared timeout helper, improve the local HTTP server lifecycle, and add timing diagnostics around listener setup, requests, and shutdown. Contributes towards #26221. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4c0289c1-b692-4cfd-8b01-09ad548d4628
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Avoid local name collisions in the shared credential storage test and import System.Diagnostics so Stopwatch resolves outside the MonoTests.System namespace. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4c0289c1-b692-4cfd-8b01-09ad548d4628
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
This PR updates monotouch-test’s System.Net.Http redirect/credential tests to better diagnose intermittent NSUrlSession redirect stalls by centralizing timeout handling and improving local HttpListener behavior and logging.
Changes:
- Refactored redirect credential tests to use a shared
GetResponseWithTimeouthelper aroundTestRuntime.TryRunAsync. - Improved local
HttpListenerresponses by explicitly framing empty responses (ContentLength64 = 0) and disabling keep-alive. - Updated listener startup/disposal with bounded retries and added detailed progress logging around listener lifecycle and HTTP requests.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…HttpListener Pick a random start port and then probe sequentially (with wraparound) so each attempt tries a distinct port, avoiding the flakiness of repeatedly hitting the same random busy ports while keeping the bounded retry behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…-rolf-issue-26221-ci-ios-27-monotouch
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #41c53ff] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 203 tests passed 🎉 Tests counts✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Refactor the redirect credential tests through a shared timeout helper while retaining
TestRuntime.TryRunAsync.Improve the local HTTP server lifecycle by:
TestRuntime.TryRunAsyncandHttpClient.GetAsyncThis should make the next occurrence show whether progress stopped in the HTTP request, run-loop helper, listener setup, or listener disposal.
Related to #26221.
🤖 Pull request created by Copilot