Skip to content

[tests] Add a NWFramer.StopHandler regression test - #27624

Open
rolfbjarne wants to merge 2 commits into
mainfrom
dev/rolf/nwframer-stophandler-test
Open

rolfbjarne wants to merge 2 commits into
mainfrom
dev/rolf/nwframer-stophandler-test

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: dc58594b4c39e1d87e37548d2873536f084d5ce0

Dimension Assessment Rationale
Change confidence 9/10 ↑ NWFramerTest passes 5/5 on macOS and Mac Catalyst.
↑ 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 StopHandler and a CleanupHandler, 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 managed StopHandler trampoline tells Network.framework the stop is complete.

If the trampoline returns false instead of true, 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.

rolfbjarne and others added 2 commits December 3, 2026 18:08
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>

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 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

@MauiBot

MauiBot commented Dec 3, 2026

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: dc58594b4c39e1d87e37548d2873536f084d5ce0 [PR build]

@MauiBot

MauiBot commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

🚀 [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
✅ 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 (macOS): 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 12 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 12 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 12 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 12 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 11 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 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: dc58594b4c39e1d87e37548d2873536f084d5ce0 [PR build]

@rolfbjarne
rolfbjarne enabled auto-merge (squash) December 4, 2026 09:45
@rolfbjarne rolfbjarne added the ready-to-review This PR is ready to review/merge. label Dec 4, 2026

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

copilot ready-to-review This PR is ready to review/merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants