[dotnet-watch] Misc test and product reliability fixes#52897
Merged
tmat merged 2 commits intodotnet:release/10.0.3xxfrom Feb 11, 2026
Merged
[dotnet-watch] Misc test and product reliability fixes#52897tmat merged 2 commits intodotnet:release/10.0.3xxfrom
tmat merged 2 commits intodotnet:release/10.0.3xxfrom
Conversation
8c3c3cb to
2f3f3a3
Compare
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
2f3f3a3 to
2b87dc8
Compare
Member
Author
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves dotnet-watch reliability by re-enabling previously skipped tests, reducing test flakiness by relaxing output-order assertions, and addressing a design-time-build (DTB) issue where compiler command-line args may not be produced when inputs/outputs are up to date.
Changes:
- Re-enable previously skipped dotnet-watch hot reload tests and adjust expectations for current product behavior.
- Replace many strict output-order assertions (
WaitForOutputLineContaining/AssertOutputContains) withWaitUntilOutputContainsto reduce test fragility. - Force DTB CoreCompile execution by setting
NonExistentFile, ensuring command-line args are produced even when incremental build considers outputs up-to-date.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs | Re-enables tests and updates output assertions to improve reliability under more async/parallel watch behavior. |
| test/dotnet-watch.Tests/Browser/BrowserTests.cs | Updates browser-related tests to use less order-sensitive output waiting. |
| src/BuiltInTools/Watch/Build/EvaluationResult.cs | Sets NonExistentFile to force DTB CoreCompile to run and adds a debug assertion for command-line args availability. |
| src/BuiltInTools/Watch/Build/BuildNames.cs | Adds the NonExistentFile property name constant used by watch DTB. |
DustinCampbell
approved these changes
Feb 11, 2026
Member
DustinCampbell
left a comment
There was a problem hiding this comment.
Looks reasonable to me. Take a look at the Copilot feedback though.
This was referenced Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable skipped tests:
Reenable ApplyDeltaTests.AddSourceFile #52576
Change in DefineConstants should report rude edit and restart #49545
Replace most usages of
WaitForOutputLineContainingandAssertOutputContainswithWaitUntilOutputContains.The former validate exact ordering of events, which is not relevant to most test cases. It is harder to maintain reliability of these tests as we make more operations performed by watch asynchronous and/or parallelized.
Fix DTB - the compiler task won't set command line args property if all inputs are up to date. Roslyn works around that in VS DTB by setting property
NonExistentFile. Do the same.