diff --git a/tests/E2E Tests/WebAppUiTests/B2CWebAppCallsWebApiLocally.cs b/tests/E2E Tests/WebAppUiTests/B2CWebAppCallsWebApiLocally.cs index c5449e88a..066d082cb 100644 --- a/tests/E2E Tests/WebAppUiTests/B2CWebAppCallsWebApiLocally.cs +++ b/tests/E2E Tests/WebAppUiTests/B2CWebAppCallsWebApiLocally.cs @@ -167,7 +167,7 @@ public async Task Susi_B2C_LocalAccount_TodoAppFunctionsCorrectlyAsync() Queue processes = new Queue(); if (serviceProcess != null) { processes.Enqueue(serviceProcess); } if (clientProcess != null) { processes.Enqueue(clientProcess); } - UiTestHelpers.KillProcessTrees(processes); + await UiTestHelpers.KillProcessTreesAsync(processes); // Stop tracing and export it into a zip archive. string path = UiTestHelpers.GetTracePath(_testAssemblyPath, TraceFileName); diff --git a/tests/E2E Tests/WebAppUiTests/UiTestHelpers.cs b/tests/E2E Tests/WebAppUiTests/UiTestHelpers.cs index ee68b527b..6b99eb886 100644 --- a/tests/E2E Tests/WebAppUiTests/UiTestHelpers.cs +++ b/tests/E2E Tests/WebAppUiTests/UiTestHelpers.cs @@ -245,7 +245,7 @@ public static string GetTracePath(string testAssemblyLocation, string traceName) /// /// queue of parent processes [SupportedOSPlatform("windows")] - public static void KillProcessTrees(Queue processQueue) + public static async Task KillProcessTreesAsync(Queue processQueue) { Process currentProcess; while (processQueue.Count > 0) @@ -258,7 +258,7 @@ public static void KillProcessTrees(Queue processQueue) { processQueue.Enqueue(child); } - _ = currentProcess.WaitForExitAsync(); + await currentProcess.WaitForExitAsync(); currentProcess.StandardOutput.Close(); currentProcess.StandardError.Close();