Repository navigation
[tests] Add a NWFramer.StopHandler regression test - #27624
rolfbjarne wants to merge 2 commits into
Conversation
Register a stop handler and a cleanup handler, cancel the connection after it's ready, and verify that both handlers run and the connection is cancelled, without the stop handler explicitly marking the framer stopped. Follow-up to #27586 (comment). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…her tests Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the added NWFramer.StopHandler regression coverage.
No open issues 🎉
What changed in this PR
Adds regression coverage for NWFramer.StopHandler to verify that its native callback reports stop completion, complementing the callback ABI fixes.
Changes:
- Cancels a ready UDP loopback connection and waits for cancellation, stop, and cleanup callbacks.
- Checks that cleanup occurs without the stop handler explicitly marking the framer as stopped.
| File | Description |
|---|---|
| tests/monotouch-test/Network/NWFramerTest.cs | Adds the stop-completion regression test with bounded callback waits. |
Review effort: Balanced
✅ 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 |
🚀 [CI Build #dc58594] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 145 tests passed 🎉 Tests counts✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
dc58594b4c39e1d87e37548d2873536f084d5ce0↑ With the trampoline returning
0, the test fails with "Cleanup handler timed out".↓ Not run on iOS or tvOS devices or simulators; CI will cover those.
Add a test that registers a
StopHandlerand aCleanupHandler, cancels the connection once it's ready, and checks that both handlers run. The stop handler doesn't mark the framer as stopped itself, so this checks that the managedStopHandlertrampoline tells Network.framework the stop is complete.If the trampoline returns
falseinstead oftrue, the test fails with "Cleanup handler timed out".This came up in a review of the .NET 11 backport (#27586 (comment)). It's a test-only change, so it doesn't need to be backported.
🤖 Pull request created by Copilot
Note
This pull request was created by Copilot.