fix: treat missing expected cookie as transient network failure in TestNSurlSessionHandlerCookieContainerSetCookie#25420
Conversation
…stNSurlSessionHandlerCookieContainerSetCookie Agent-Logs-Url: https://github.com/dotnet/macios/sessions/08f85733-39b4-40c6-bcf5-d46ae2c50f48 Co-authored-by: rolfbjarne <249268+rolfbjarne@users.noreply.github.com>
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.
There was a problem hiding this comment.
Pull request overview
This PR adjusts a flaky network-dependent test (TestNSurlSessionHandlerCookieContainerSetCookie) to treat “request completed but expected cookie missing” as a transient CI failure, reducing spurious macOS CI failures in the System.Net.Http test suite.
Changes:
- Precomputes whether the expected cookie was stored in the
CookieContainerafter the async request. - Expands the CI ignore guard to include missing-cookie cases in addition to timeouts.
- Reuses the computed boolean in the final assertion.
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.
This comment has been minimized.
This comment has been minimized.
|
@copilot address the comments |
…HandlerCookieContainerSetCookie Agent-Logs-Url: https://github.com/dotnet/macios/sessions/269d09e0-2844-4dfa-9c95-470afec2eead Co-authored-by: rolfbjarne <249268+rolfbjarne@users.noreply.github.com>
Head branch was pushed to by a user without write access
Addressed both review comments in 883e89e:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #883e89e] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #883e89e] Build passed (Build packages) ✅Pipeline on Agent |
✅ 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 |
✅ [PR Build #883e89e] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #883e89e] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 175 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. ( macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
TestNSurlSessionHandlerCookieContainerSetCookieto treat missing expected cookie as transient network failure (ignore in CI)CookieContainerinspection after!completedguard to avoid concurrent access!completedand!hasExpectedCookieCI-ignore guards so real exceptions still fail the test