Add macOS CI job, fix Cleanup hang on macOS, and add regression test (#1148)
* Initial plan * Add macOS CI job and regression test for Cleanup(block: false) bounded time Agent-Logs-Url: https://github.com/zeromq/netmq/sessions/18a93bf8-a14c-4c0d-9f27-b797b58f300f Co-authored-by: drewnoakes <350947+drewnoakes@users.noreply.github.com> * Fix macOS/Windows CI hang: correct second Select timeout, fix Cleanup lock scope, harden test thread Agent-Logs-Url: https://github.com/zeromq/netmq/sessions/259a6416-41cd-429e-8110-4e1559b0130e Co-authored-by: drewnoakes <350947+drewnoakes@users.noreply.github.com> * Remove macOS Socket.Select workaround — the dotnet/corefx#39617 bug is fixed in .NET 9+ Agent-Logs-Url: https://github.com/zeromq/netmq/sessions/0798ef7e-5281-4907-afe0-676d68fe60c2 Co-authored-by: drewnoakes <350947+drewnoakes@users.noreply.github.com> * Fix macOS Socket.Select hang: pass null errorList to avoid dotnet/corefx#39617 Agent-Logs-Url: https://github.com/zeromq/netmq/sessions/c84022ee-fa21-46a4-9cea-b5920dcf2ab5 Co-authored-by: drewnoakes <350947+drewnoakes@users.noreply.github.com> * Fix macOS hang: cap Socket.Select timeout to 500ms to prevent indefinite blocking Agent-Logs-Url: https://github.com/zeromq/netmq/sessions/657e4fe7-212a-434e-a43f-b35f96202cb7 Co-authored-by: drewnoakes <350947+drewnoakes@users.noreply.github.com> * Instrument macOS CI: add blame-hang diagnostics, filter out BeaconTests, add timeout Agent-Logs-Url: https://github.com/zeromq/netmq/sessions/f7a57fef-51ae-409f-b0b6-db12c8b037d8 Co-authored-by: drewnoakes <350947+drewnoakes@users.noreply.github.com> * Fix macOS CI test failures: increase timer test sleep margins Three timer tests (RunMultipleTimes, EnableTimer, ChangeTimerInterval) in NetMQPollerTest failed on macOS CI with one fewer timer tick than expected. These tests use 10-20ms timer intervals with tight 6x sleep multipliers. On macOS CI runners, thread startup and Socket.Select overhead eat into the window, causing the timer to miss one tick before Stop() is called. Fix: increase sleep multipliers from 6x to 30x for timer-interval tests, and from 200ms to 500ms for ChangeTimerInterval. The tests verify timer functionality (correct count, enable/disable), not precise timing. Agent-Logs-Url: https://github.com/zeromq/netmq/sessions/e2aa0d2e-02b9-4fd2-9f89-e0fa13d4bd0a Co-authored-by: drewnoakes <350947+drewnoakes@users.noreply.github.com> * Fix macOS CI test failures: TwoTimers, ChangeTimerInterval, AsyncEnumerableCanceled, ReceiveMessageWithTimeout - TwoTimers: increase timer intervals from 60/40ms to 300/200ms to prevent both timers firing in the same poll cycle on macOS where startup overhead can push the first cycle past both short intervals - ChangeTimerInterval: widen assertion tolerance from ±10ms to ±20ms for macOS timer jitter - AsyncEnumerableCanceled: increase test timeout from 120ms to 5000ms and CancelAfter from 100ms to 500ms — the original 120ms total was too tight for macOS CI overhead - ReceiveMessageWithTimeout: use random port instead of hardcoded 12345 and add 10s timeouts to WaitOne calls to prevent indefinite hangs if the sync flow breaks Agent-Logs-Url: https://github.com/zeromq/netmq/sessions/34687bca-d1b9-45ab-a927-4e3dfe336abe Co-authored-by: drewnoakes <350947+drewnoakes@users.noreply.github.com> * Fix macOS CI test failures: RemoveTimer (increase timer to 500ms) and ChangeTimerInterval (increase intervals to 100/200ms with ±50ms tolerance) Agent-Logs-Url: https://github.com/zeromq/netmq/sessions/e0c39150-967d-455b-9da2-820d3ef351db Co-authored-by: drewnoakes <350947+drewnoakes@users.noreply.github.com> * Fix ReceiveMessageWithTimeout flaky test: increase waitTime to 1500ms and subscription propagation delay to 500ms Agent-Logs-Url: https://github.com/zeromq/netmq/sessions/2c095c5d-19b8-4a3b-8c5c-6c70a8c34cff Co-authored-by: drewnoakes <350947+drewnoakes@users.noreply.github.com> * Fix macOS CI flaky tests: ChangeTimerInterval (500/1000ms intervals, ±200ms tolerance) and ReceiveMessageWithTimeout (10s receive timeout) Agent-Logs-Url: https://github.com/zeromq/netmq/sessions/36ba2064-01fa-4291-8041-fe7a6f6e83ca Co-authored-by: drewnoakes <350947+drewnoakes@users.noreply.github.com> * Add blame-hang timeout and timeout-minutes to Windows test steps to prevent indefinite hangs on net472 Agent-Logs-Url: https://github.com/zeromq/netmq/sessions/7ff6814f-81c7-4600-b443-e21477c8dcb3 Co-authored-by: drewnoakes <350947+drewnoakes@users.noreply.github.com> * Fix TwoTimers flaky test: increase timer gap to 750/500ms to prevent same-cycle firing on macOS Agent-Logs-Url: https://github.com/zeromq/netmq/sessions/a04578dc-c753-46a9-8897-f4fd9497ae0c Co-authored-by: drewnoakes <350947+drewnoakes@users.noreply.github.com> * Replace hardcoded port 55367 with dynamic ports in CurveTests and ZMTPTests, and fix other hardcoded ports in SocketTests and RouterTests Agent-Logs-Url: https://github.com/zeromq/netmq/sessions/a9a483f4-dbe3-48a8-9731-f08cec715524 Co-authored-by: drewnoakes <350947+drewnoakes@users.noreply.github.com> * Add timeout-minutes and --blame-hang to Windows coverage step to prevent 6-hour hangs Agent-Logs-Url: https://github.com/zeromq/netmq/sessions/249453e6-4728-40d3-af1f-42eee4812eef Co-authored-by: drewnoakes <350947+drewnoakes@users.noreply.github.com> * Fix MonitorTests timeout from 1s to 5s for macOS CI Agent-Logs-Url: https://github.com/zeromq/netmq/sessions/33f9198c-c62d-49f5-8d55-da446c1f5d4f Co-authored-by: drewnoakes <350947+drewnoakes@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: drewnoakes <350947+drewnoakes@users.noreply.github.com>
C
Copilot committed
0098db20c9116e05b5faa2a0102db6dd227d8b4e
Parent: dd3206a
Committed by GitHub <noreply@github.com>
on 4/30/2026, 12:28:13 AM