Skip to content

Commit ce0c4d1

Browse files
committed
Fix
1 parent 99ed5a4 commit ce0c4d1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,9 +516,10 @@ public async Task AutoRestartOnRudeEditAfterRestartPrompt()
516516
// rude edit: adding virtual method
517517
UpdateSourceFile(programPath, src => src.Replace("/* member placeholder */", "public virtual void F() {}"));
518518

519+
// the prompt is printed into stdout while the error is printed into stderr, so they might arrive in any order:
519520
await App.AssertOutputLineStartsWith(" ❔ Do you want to restart your app? Yes (y) / No (n) / Always (a) / Never (v)", failure: _ => false);
521+
await App.WaitUntilOutputContains(MessageDescriptor.RestartNeededToApplyChanges);
520522

521-
App.AssertOutputContains(MessageDescriptor.RestartNeededToApplyChanges);
522523
App.AssertOutputContains($"❌ {programPath}(39,11): error ENC0023: Adding an abstract method or overriding an inherited method requires restarting the application.");
523524
App.Process.ClearOutput();
524525

@@ -1259,9 +1260,10 @@ public async Task Aspire_BuildError_ManualRestart()
12591260
serviceSourcePath,
12601261
serviceSource.Replace("record WeatherForecast", "record WeatherForecast2"));
12611262

1263+
// the prompt is printed into stdout while the error is printed into stderr, so they might arrive in any order:
12621264
await App.WaitForOutputLineContaining(" ❔ Do you want to restart these projects? Yes (y) / No (n) / Always (a) / Never (v)");
1265+
await App.WaitUntilOutputContains(MessageDescriptor.RestartNeededToApplyChanges);
12631266

1264-
App.AssertOutputContains(MessageDescriptor.RestartNeededToApplyChanges);
12651267
App.AssertOutputContains($"dotnet watch ❌ {serviceSourcePath}(40,1): error ENC0020: Renaming record 'WeatherForecast' requires restarting the application.");
12661268
App.AssertOutputContains("dotnet watch ⌚ Affected projects:");
12671269
App.AssertOutputContains("dotnet watch ⌚ WatchAspire.ApiService");

0 commit comments

Comments
 (0)