Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
189c634
Fix CI flakiness: 5 root causes addressing 48% failure rate
mmitche Mar 13, 2026
3ecb050
Revert dotnet-watch changes in favor of tmat's fix in PR #53271
mmitche Mar 17, 2026
842031e
Merge upstream/main to pick up tmat's dotnet-watch fix (#53271) and o…
mmitche Mar 17, 2026
fccc655
Trigger CI build #1 after merge from main
mmitche Mar 17, 2026
5be6d9e
Trigger CI build #2 - streak: 1/25
mmitche Mar 17, 2026
cdf5d19
Trigger CI build #3 - streak: 2/25
mmitche Mar 17, 2026
22f201a
Trigger CI build #4 - streak: 3/25
mmitche Mar 18, 2026
672d0ec
Trigger CI build #5 - streak reset (dotnet-watch flaky test)
mmitche Mar 18, 2026
e22cf34
Trigger CI build #6 - streak: 1/25
mmitche Mar 18, 2026
a1ebf22
Trigger CI build #7 - streak: 2/25
mmitche Mar 18, 2026
7893dc5
Fix flaky dotnet-watch ProjectUpdateInProcTests race condition
mmitche Mar 18, 2026
17ed46b
ci: validation run 9
mmitche Mar 18, 2026
90c3350
ci: validation run 10
mmitche Mar 18, 2026
c690171
ci: validation run 11
mmitche Mar 19, 2026
5386d82
ci: validation run 12
mmitche Mar 19, 2026
230d5ee
ci: validation run 13
mmitche Mar 19, 2026
125c226
Fix DefaultRequestDispatcherTest hang: use kernel waits instead of async
mmitche Mar 19, 2026
ce3d3d1
Fix xUnit1031: use dedicated thread for timeout instead of Task.Wait
mmitche Mar 19, 2026
f858f5f
Fix TemplateEngine snapshot flakiness and BrowserDiagnostics hang
mmitche Mar 19, 2026
1677d0c
ci: validation run 15
mmitche Mar 19, 2026
e97da4d
ci: validation run 16
mmitche Mar 19, 2026
bbf6efd
ci: validation run 17
mmitche Mar 19, 2026
c3c701f
ci: validation run 18
mmitche Mar 19, 2026
d56cf34
ci: validation run 19
mmitche Mar 20, 2026
644dd0f
ci: trigger validation run 19
mmitche Mar 20, 2026
ecebfd5
ci: validation run 20
mmitche Mar 20, 2026
513e189
ci: validation run 21
mmitche Mar 20, 2026
16761f0
Fix Aspire test hang: skip Console.ReadKey when stdin is redirected
mmitche Mar 20, 2026
84d258f
ci: trigger validation run 22
mmitche Mar 20, 2026
5d61d4f
Merge upstream/main and resolve PhysicalConsole.cs conflict
mmitche Mar 20, 2026
b2da329
ci: validation run 23
mmitche Mar 20, 2026
06c9f29
ci: validation run 24
mmitche Mar 20, 2026
6b850a8
ci: retrigger validation run 24
mmitche Mar 20, 2026
99f60c7
ci: validation run 25
mmitche Mar 20, 2026
fa48b4b
ci: validation run 26
mmitche Mar 20, 2026
22505b5
ci: validation run 27
mmitche Mar 21, 2026
e99bb84
ci: validation run 28
mmitche Mar 21, 2026
5e36300
ci: validation run 29
mmitche Mar 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions build/RunTestsOnHelix.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ set DOTNET_ROOT=%HELIX_CORRELATION_PAYLOAD%\d
set PATH=%DOTNET_ROOT%;%PATH%
set TestFullMSBuild=%1

REM Set DOTNET_HOST_PATH so MSBuild task hosts can locate the dotnet executable.
REM Without this, tasks from NuGet packages that use TaskHostFactory fail with MSB4216.
set DOTNET_HOST_PATH=%DOTNET_ROOT%\dotnet.exe
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ViktorHofer does this make sense?


REM Ensure Visual Studio instances allow preview SDKs
PowerShell -ExecutionPolicy ByPass -NoProfile -File "%HELIX_CORRELATION_PAYLOAD%\t\eng\enable-preview-sdks.ps1"

Expand All @@ -35,14 +39,16 @@ dotnet new --debug:ephemeral-hive
dotnet nuget list source --configfile %TestExecutionDirectory%\nuget.config
if exist %TestExecutionDirectory%\Testpackages dotnet nuget add source %TestExecutionDirectory%\Testpackages --name testpackages --configfile %TestExecutionDirectory%\nuget.config

dotnet nuget remove source dotnet6-transport --configfile %TestExecutionDirectory%\nuget.config
dotnet nuget remove source dotnet6-internal-transport --configfile %TestExecutionDirectory%\nuget.config
dotnet nuget remove source dotnet7-transport --configfile %TestExecutionDirectory%\nuget.config
dotnet nuget remove source dotnet7-internal-transport --configfile %TestExecutionDirectory%\nuget.config
dotnet nuget remove source richnav --configfile %TestExecutionDirectory%\nuget.config
dotnet nuget remove source vs-impl --configfile %TestExecutionDirectory%\nuget.config
dotnet nuget remove source dotnet-libraries-transport --configfile %TestExecutionDirectory%\nuget.config
dotnet nuget remove source dotnet-tools-transport --configfile %TestExecutionDirectory%\nuget.config
dotnet nuget remove source dotnet-libraries --configfile %TestExecutionDirectory%\nuget.config
dotnet nuget remove source dotnet-eng --configfile %TestExecutionDirectory%\nuget.config
REM Remove feeds not needed for tests. Errors from non-existent sources
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any idea which feeds remain? maybe we should have a separate nuget.config just for the tests

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it just updated comments here.

REM (e.g. internal-transport feeds only present in internal builds) are ignored.
dotnet nuget remove source dotnet6-transport --configfile %TestExecutionDirectory%\nuget.config 2>nul
dotnet nuget remove source dotnet6-internal-transport --configfile %TestExecutionDirectory%\nuget.config 2>nul
dotnet nuget remove source dotnet7-transport --configfile %TestExecutionDirectory%\nuget.config 2>nul
dotnet nuget remove source dotnet7-internal-transport --configfile %TestExecutionDirectory%\nuget.config 2>nul
dotnet nuget remove source richnav --configfile %TestExecutionDirectory%\nuget.config 2>nul
dotnet nuget remove source vs-impl --configfile %TestExecutionDirectory%\nuget.config 2>nul
dotnet nuget remove source dotnet-libraries-transport --configfile %TestExecutionDirectory%\nuget.config 2>nul
dotnet nuget remove source dotnet-tools-transport --configfile %TestExecutionDirectory%\nuget.config 2>nul
dotnet nuget remove source dotnet-libraries --configfile %TestExecutionDirectory%\nuget.config 2>nul
dotnet nuget remove source dotnet-eng --configfile %TestExecutionDirectory%\nuget.config 2>nul
dotnet nuget list source --configfile %TestExecutionDirectory%\nuget.config
30 changes: 19 additions & 11 deletions build/RunTestsOnHelix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ export MicrosoftNETBuildExtensionsTargets=$HELIX_CORRELATION_PAYLOAD/ex/msbuildE
export DOTNET_ROOT=$HELIX_CORRELATION_PAYLOAD/d
export PATH=$DOTNET_ROOT:$PATH

# Set DOTNET_HOST_PATH so MSBuild task hosts can locate the dotnet executable.
# Without this, tasks from NuGet packages that use TaskHostFactory (e.g. ComputeWasmBuildAssets
# from WebAssembly SDK, ComputeManagedAssemblies from ILLink) fail with MSB4216 on macOS
# because the task host process cannot find the dotnet host to launch.
export DOTNET_HOST_PATH=$DOTNET_ROOT/dotnet

export TestExecutionDirectory=$(realpath "$(mktemp -d "${TMPDIR:-/tmp}"/dotnetSdkTests.XXXXXXXX)")
export DOTNET_CLI_HOME=$TestExecutionDirectory/.dotnet
cp -a $HELIX_CORRELATION_PAYLOAD/t/TestExecutionDirectoryFiles/. $TestExecutionDirectory/
Expand All @@ -22,15 +28,17 @@ dotnet new --debug:ephemeral-hive

dotnet nuget list source --configfile $TestExecutionDirectory/NuGet.config
dotnet nuget add source $TestExecutionDirectory/Testpackages --configfile $TestExecutionDirectory/NuGet.config
#Remove feeds not needed for tests
dotnet nuget remove source dotnet6-transport --configfile $TestExecutionDirectory/NuGet.config
dotnet nuget remove source dotnet6-internal-transport --configfile $TestExecutionDirectory/NuGet.config
dotnet nuget remove source dotnet7-transport --configfile $TestExecutionDirectory/NuGet.config
dotnet nuget remove source dotnet7-internal-transport --configfile $TestExecutionDirectory/NuGet.config
dotnet nuget remove source richnav --configfile $TestExecutionDirectory/NuGet.config
dotnet nuget remove source vs-impl --configfile $TestExecutionDirectory/NuGet.config
dotnet nuget remove source dotnet-libraries-transport --configfile $TestExecutionDirectory/NuGet.config
dotnet nuget remove source dotnet-tools-transport --configfile $TestExecutionDirectory/NuGet.config
dotnet nuget remove source dotnet-libraries --configfile $TestExecutionDirectory/NuGet.config
dotnet nuget remove source dotnet-eng --configfile $TestExecutionDirectory/NuGet.config
# Remove feeds not needed for tests. Use || true to avoid errors when a source
# doesn't exist (e.g. internal-transport feeds are only present in internal builds).
dotnet nuget remove source dotnet6-transport --configfile $TestExecutionDirectory/NuGet.config || true
dotnet nuget remove source dotnet6-internal-transport --configfile $TestExecutionDirectory/NuGet.config || true
dotnet nuget remove source dotnet7-transport --configfile $TestExecutionDirectory/NuGet.config || true
dotnet nuget remove source dotnet7-internal-transport --configfile $TestExecutionDirectory/NuGet.config || true
dotnet nuget remove source richnav --configfile $TestExecutionDirectory/NuGet.config || true
dotnet nuget remove source vs-impl --configfile $TestExecutionDirectory/NuGet.config || true
dotnet nuget remove source dotnet-libraries-transport --configfile $TestExecutionDirectory/NuGet.config || true
dotnet nuget remove source dotnet-tools-transport --configfile $TestExecutionDirectory/NuGet.config || true
dotnet nuget remove source dotnet-libraries --configfile $TestExecutionDirectory/NuGet.config || true
dotnet nuget remove source dotnet-eng --configfile $TestExecutionDirectory/NuGet.config || true
dotnet nuget list source --configfile $TestExecutionDirectory/NuGet.config

37 changes: 27 additions & 10 deletions src/BlazorWasmSdk/Tasks/GZipCompress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ public class GZipCompress : Task
[Required]
public string OutputDirectory { get; set; }

// Retry count for transient file I/O errors (e.g., antivirus locks on CI machines).
private const int MaxRetries = 3;
private const int RetryDelayMs = 200;

public override bool Execute()
{
CompressedFiles = new ITaskItem[FilesToCompress.Length];
Expand Down Expand Up @@ -56,18 +60,31 @@ public override bool Execute()
Log.LogMessage(MessageImportance.Low, "Compressing '{0}' because file is newer than '{1}'.", inputFullPath, outputRelativePath);
}

try
// Retry on IOException to handle transient file locks from antivirus, file
// indexing, or parallel MSBuild nodes on CI machines (see dotnet/sdk#53424).
for (int attempt = 1; attempt <= MaxRetries; attempt++)
{
using var sourceStream = File.OpenRead(file.ItemSpec);
using var fileStream = File.Create(outputRelativePath);
using var stream = new GZipStream(fileStream, CompressionLevel.Optimal);
try
{
using var sourceStream = File.OpenRead(file.ItemSpec);
using var fileStream = File.Create(outputRelativePath);
using var stream = new GZipStream(fileStream, CompressionLevel.Optimal);

sourceStream.CopyTo(stream);
}
catch (Exception e)
{
Log.LogErrorFromException(e);
return;
sourceStream.CopyTo(stream);
return; // Success
}
catch (IOException) when (attempt < MaxRetries)
{
Log.LogMessage(MessageImportance.Low,
"Retrying compression of '{0}' (attempt {1}/{2}) due to transient I/O error.",
file.ItemSpec, attempt, MaxRetries);
Thread.Sleep(RetryDelayMs * attempt);
}
catch (Exception e)
{
Log.LogErrorFromException(e);
return;
}
}
});

Expand Down
10 changes: 9 additions & 1 deletion src/Dotnet.Watch/Watch/UI/PhysicalConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ internal sealed class PhysicalConsole : IConsole
public PhysicalConsole(TestFlags testFlags)
{
Console.OutputEncoding = Encoding.UTF8;
_ = testFlags.HasFlag(TestFlags.ReadKeyFromStdin) ? ListenToStandardInputAsync() : ListenToConsoleKeyPressAsync();

if (testFlags.HasFlag(TestFlags.ReadKeyFromStdin))
{
_ = ListenToStandardInputAsync();
}
else if (!Console.IsInputRedirected)
{
_ = ListenToConsoleKeyPressAsync();
}
}

private async Task ListenToStandardInputAsync()
Expand Down
11 changes: 11 additions & 0 deletions test/Microsoft.DotNet.HotReload.Test.Utilities/AwaitableProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,17 @@ public async ValueTask DisposeAsync()
Process.ErrorDataReceived -= OnData;
Process.OutputDataReceived -= OnData;

// Close stdin before killing the process to unblock any pending stdin reads
// (e.g. PhysicalConsole.ListenToStandardInputAsync on Linux where stdin reads
// don't unblock on process kill).
try
{
Process.StandardInput?.Close();
}
catch
{
}

try
{
Process.CancelErrorRead();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public async Task Dispatcher_ProcessSimultaneousConnections_HitsKeepAliveTimeout
return connectionTask;
}

readySource.SetResult(true);
readySource.TrySetResult(true);
return new TaskCompletionSource<Connection>().Task;
});

Expand All @@ -382,11 +382,18 @@ public async Task Dispatcher_ProcessSimultaneousConnections_HitsKeepAliveTimeout
}
};
var keepAlive = TimeSpan.FromSeconds(1);
var dispatcherTask = Task.Run(() =>

// Use Task.Factory.StartNew with LongRunning to run the dispatcher on a dedicated
// OS thread instead of a thread pool thread. The dispatcher's Run() method uses
// blocking Task.WaitAny() which permanently blocks its thread. On Helix CI agents
// running many tests in parallel, blocking a thread pool thread contributes to pool
// starvation, which prevents Task.Delay timer callbacks from firing, causing the
// keep-alive timeout to never complete and the test to hang indefinitely.
var dispatcherTask = Task.Factory.StartNew(() =>
{
var dispatcher = new DefaultRequestDispatcher(connectionHost.Object, compilerHost, CancellationToken.None, eventBus, keepAlive);
dispatcher.Run();
});
}, CancellationToken.None, TaskCreationOptions.LongRunning, TaskScheduler.Default);

// Wait for all connections to be created.
await readySource.Task;
Expand All @@ -402,7 +409,20 @@ public async Task Dispatcher_ProcessSimultaneousConnections_HitsKeepAliveTimeout

// Act
// Now dispatcher should be in an idle state with no active connections.
await dispatcherTask;
// Use a dedicated thread to enforce the timeout, since under extreme thread pool
// starvation on Helix CI, even WaitAsync's timer continuations can't be scheduled.
// A dedicated OS thread with Thread.Join(timeout) uses a kernel wait that works
// regardless of thread pool state.
var completed = false;
var timeoutThread = new Thread(() =>
{
completed = dispatcherTask.Wait(TimeSpan.FromSeconds(60));
}) { IsBackground = true };
timeoutThread.Start();
timeoutThread.Join(TimeSpan.FromSeconds(65));
Assert.True(completed,
"Dispatcher did not shut down within 60 seconds. This likely indicates " +
"thread pool starvation preventing Task.Delay timer callbacks from firing.");

// Assert
Assert.False(eventBus.HasDetectedBadConnection);
Expand Down
17 changes: 17 additions & 0 deletions test/TestAssets/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
<!-- Prevent test asset projects from picking up the repo's root Directory.Build.targets. -->
<Project>

<!-- For packable Exe projects (DotNetCliToolReference tools targeting netcoreapp2.2),
include the auto-generated runtimeconfig.json in the NuGet package so the dotnet
host can find it adjacent to the DLL. This enables RollForward=LatestMajor to
work correctly, allowing tools to run on machines that only have .NET 6.0+
installed (common on Helix CI agents that lack .NET Core 2.2). Without this,
tools fail with FrameworkMissingFailure (exit code 0x80008096) because the host
cannot roll forward from 2.2.0 without a runtimeconfig.json specifying the
rollForward policy. -->
<Target Name="IncludeRuntimeConfigInPackage"
AfterTargets="Build"
Condition="'$(OutputType)' == 'Exe' AND '$(IsPackable)' == 'true' AND '$(GenerateRuntimeConfigurationFiles)' != 'false'">
<ItemGroup>
<BuildOutputInPackage Include="$(ProjectRuntimeConfigFilePath)"
Condition="'$(ProjectRuntimeConfigFilePath)' != '' AND Exists('$(ProjectRuntimeConfigFilePath)')" />
</ItemGroup>
</Target>

</Project>
3 changes: 3 additions & 0 deletions test/dotnet-new.IntegrationTests/CommonTemplatesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public async Task AllCommonItemsCreate(string expectedTemplateName, string templ
.WithCustomScrubbers(
ScrubbersDefinition.Empty
.AddScrubber(sb => sb.UnixifyNewlines(), "out")
.AddScrubber(sb => sb.ScrubMSBuildDebugLogMessage(), "txt")
.AddScrubber((path, content) =>
{
if (path.Replace(Path.DirectorySeparatorChar, '/') == "std-streams/stdout.txt")
Expand Down Expand Up @@ -224,6 +225,7 @@ public async Task AotVariants(string name, string language)
ScrubbersDefinition.Empty
.AddScrubber(sb => sb.Replace($"<TargetFramework>{currentDefaultFramework}</TargetFramework>", "<TargetFramework>%FRAMEWORK%</TargetFramework>"))
.AddScrubber(sb => sb.Replace(finalProjectName, "%PROJECT_PATH%").UnixifyDirSeparators().ScrubByRegex("(^ Restored .* \\()(.*)(\\)\\.)", "$1%DURATION%$3", RegexOptions.Multiline), "txt")
.AddScrubber(sb => sb.ScrubMSBuildDebugLogMessage(), "txt")
);

VerificationEngine engine = new(_logger);
Expand Down Expand Up @@ -424,6 +426,7 @@ public async Task FeaturesSupport(
.AddScrubber(sb => sb.Replace($"<LangVersion>{langVersion}</LangVersion>", "<LangVersion>%LANG%</LangVersion>"))
.AddScrubber(sb => sb.Replace($"<TargetFramework>{framework ?? currentDefaultFramework}</TargetFramework>", "<TargetFramework>%FRAMEWORK%</TargetFramework>"))
.AddScrubber(sb => sb.Replace(finalProjectName, "%PROJECT_PATH%").UnixifyDirSeparators().ScrubByRegex("(^ Restored .* \\()(.*)(\\)\\.)", "$1%DURATION%$3", RegexOptions.Multiline), "txt")
.AddScrubber(sb => sb.ScrubMSBuildDebugLogMessage(), "txt")
);

VerificationEngine engine = new(_logger);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public async Task DotnetCSharpClassTemplatesTest(
.WithCustomEnvironment(environmentUnderTest!)
.WithCustomScrubbers(
ScrubbersDefinition.Empty
.AddScrubber(sb => sb.ScrubMSBuildDebugLogMessage(), "txt")
.AddScrubber((path, content) =>
{
if (path.Replace(Path.DirectorySeparatorChar, '/') == "std-streams/stdout.txt")
Expand Down Expand Up @@ -157,6 +158,7 @@ public async Task DotnetVisualBasicClassTemplatesTest(
.WithCustomEnvironment(environmentUnderTest!)
.WithCustomScrubbers(
ScrubbersDefinition.Empty
.AddScrubber(sb => sb.ScrubMSBuildDebugLogMessage(), "txt")
.AddScrubber((path, content) =>
{
if (path.Replace(Path.DirectorySeparatorChar, '/') == "std-streams/stdout.txt")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ public async Task TemplateEngineSamplesProjectTest(
.WithCustomEnvironment(environmentUnderTest!)
.WithCustomScrubbers(
ScrubbersDefinition.Empty
.AddScrubber(sb => sb.Replace(DateTime.Now.ToString("MM/dd/yyyy"), "**/**/****")));
.AddScrubber(sb => sb.Replace(DateTime.Now.ToString("MM/dd/yyyy"), "**/**/****"))
.AddScrubber(sb => sb.ScrubMSBuildDebugLogMessage(), "txt"));

VerificationEngine engine = new(_log);
await engine.Execute(options);
Expand Down
9 changes: 9 additions & 0 deletions test/dotnet-new.IntegrationTests/VerifyScrubbers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ internal static void ScrubByRegex(this StringBuilder output, string pattern, str
output.Append(finalOutput);
}

/// <summary>
/// Removes MSBuild debug log path messages that appear intermittently depending on
/// telemetry/profiling settings, which vary across CI machines causing snapshot mismatches.
/// </summary>
internal static void ScrubMSBuildDebugLogMessage(this StringBuilder output)
{
output.ScrubByRegex(@"^\s*MSBuild logs and debug information will be at .*[\r\n]*", "", RegexOptions.Multiline);
}

/// <summary>
/// Replaces content matching <paramref name="textToReplace"/> with <paramref name="replacement"/>.
/// </summary>
Expand Down
14 changes: 12 additions & 2 deletions test/dotnet-watch.Tests/HotReload/ProjectUpdateInProcTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,15 @@ public async Task ProjectAndSourceFileChange_AddProjectReference()

AssertEx.ContainsSubstring("Resolving 'Dependency, Version=1.0.0.0'", w.Reporter.ProcessOutput);

// Wait for the fire-and-forget task in CompilationHandler.CompleteApplyOperationAsync
// to finish logging ManagedCodeChangesApplied. The app output arrives before this task
// completes because it's not awaited (line 497 of CompilationHandler.cs).
using var waitCts = new CancellationTokenSource(TimeSpan.FromSeconds(30));
await managedCodeChangesApplied.WaitAsync(waitCts.Token);

Assert.Equal(1, projectChangeTriggeredReEvaluation.CurrentCount);
Assert.Equal(1, projectsRebuilt.CurrentCount);
Assert.Equal(1, projectDependenciesDeployed.CurrentCount);
Assert.Equal(1, managedCodeChangesApplied.CurrentCount);
}

[Fact]
Expand Down Expand Up @@ -174,9 +179,14 @@ public async Task ProjectAndSourceFileChange_AddPackageReference()

AssertEx.ContainsSubstring("Resolving 'Newtonsoft.Json, Version=13.0.0.0'", w.Reporter.ProcessOutput);

// Wait for the fire-and-forget task in CompilationHandler.CompleteApplyOperationAsync
// to finish logging ManagedCodeChangesApplied. The app output arrives before this task
// completes because it's not awaited (line 497 of CompilationHandler.cs).
using var waitCts = new CancellationTokenSource(TimeSpan.FromSeconds(30));
await managedCodeChangesApplied.WaitAsync(waitCts.Token);

Assert.Equal(1, projectChangeTriggeredReEvaluation.CurrentCount);
Assert.Equal(0, projectsRebuilt.CurrentCount);
Assert.Equal(1, projectDependenciesDeployed.CurrentCount);
Assert.Equal(1, managedCodeChangesApplied.CurrentCount);
}
}
Loading