Repository navigation
[tests] Avoid DispatchGroup console deadlock. Fixes #26537 - #26585
Conversation
Fixes #26537 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The change is small, test-only, and directly addresses the deadlock trigger by removing background-thread console output.
Pull request overview
This PR updates the DispatchGroupTest.WaitTest in monotouch-test to avoid calling Console.WriteLine from a background thread, mitigating a known console deadlock scenario in NUnit test runs (tracked in #26537).
Changes:
- Removed background-thread
Console.WriteLinefromDispatchGroupTest.WaitTest. - Added a simple signal to confirm the dispatched work executed before asserting.
File summaries
| File | Description |
|---|---|
| tests/monotouch-test/CoreFoundation/DispatchGroupTest.cs | Removes background console output in WaitTest and replaces it with a completion signal to preserve the test’s intent without triggering the console deadlock. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
✅ 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.
🚀 [CI Build #dcabecd] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 264 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 |
There's a deadlock when Console.WriteLine is called from background threads in our NUnit tests; there's a fix in progress (#26580).
However, calling Console.WriteLine in the background for this particular test is unnecessary anyways, so just don't do it, which also fixes this specific issue.
Fixes #26537.
🤖 Pull request created by Copilot