Repository navigation
[net11.0] 'dotnet watch' works again now, so enable the corresponding tests. - #25712
Conversation
… tests. Also a few improvements, because this test turned out rather unpredictable locally: * Detect if the build failed, and terminate the test early. The build shouldn't fail, but yet it randomly does, and this makes the test fail immediately instead of having the test time out (after a 2 min wait). * Don't give stdin to 'dotnet watch', because 'dotnet test' goes bananas. Deadlocks everywhere (dozens of threads stuck while trying to determine the cursor position in the terminal, etc). * Disable build servers. Not sure if it helps, but when random things fail, random stuff gets tried, and this won't hurt. * Don't run desktop test apps with 'open', because then the test app's process is not a descendent of the 'dotnet watch' process, and if something goes wrong and the test needs to kill 'dotnet watch', the test app won't be killed. * Always cancel the 'dotnet watch' process at the end. Copilot suggested doing this, and it sounded good so here it is. * Augment the 'Execution' class to kill the entire process tree. Once again, Copilot suggested doing this, and it sounds like a good thing to do. * Add CoreCLR mobile variations.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
This PR re-enables and expands the dotnet watch unit tests on the net11.0 branch, while improving test reliability and process handling in the shared Execution helper used by tests/tools.
Changes:
- Extend
Executionto optionally close stdin for spawned processes, and to kill process trees on cancellation/timeout (where supported). - Re-enable/expand
DotNetWatchTestacross additional Apple platforms and add CoreCLR/Mono runtime variations. - Improve
DotNetWatchTestrobustness (detect initial build failures earlier, avoid stdin deadlocks, and adjust cleanup behavior).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| tools/common/Execution.cs | Adds stdin-closing option and introduces process-tree kill helper used on cancellation/timeout. |
| tests/dotnet/UnitTests/DotNetWatchTest.cs | Re-enables/enlarges dotnet watch coverage and hardens the test flow & cleanup. |
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.
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.
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.
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.
This comment has been minimized.
This comment has been minimized.
- Remove unused pid/log parameters from KillProcess. - Detect build failures early while waiting for app start, instead of timing out after 1 minute. - Move 'Waiting for changes!' log after confirming the build succeeded. - Log exceptions and timeout in cleanup path instead of swallowing them. Co-authored-by: Copilot <223556219+Copilot@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.
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.
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.
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.
✅ [PR Build #05e2813] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #05e2813] 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 #05e2813] Build passed (Build macOS tests) ✅Pipeline on Agent |
🚀 [CI Build #05e2813] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 205 tests passed 🎉 Tests counts✅ cecil: 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 |
Also a few improvements, because this test turned out rather unpredictable locally: