Skip to content

Commit a776bd9

Browse files
committed
await the process.WaitForExitAsync call
1 parent 9d7dc47 commit a776bd9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/E2E Tests/WebAppUiTests/B2CWebAppCallsWebApiLocally.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public async Task Susi_B2C_LocalAccount_TodoAppFunctionsCorrectlyAsync()
167167
Queue<Process> processes = new Queue<Process>();
168168
if (serviceProcess != null) { processes.Enqueue(serviceProcess); }
169169
if (clientProcess != null) { processes.Enqueue(clientProcess); }
170-
UiTestHelpers.KillProcessTrees(processes);
170+
await UiTestHelpers.KillProcessTreesAsync(processes);
171171

172172
// Stop tracing and export it into a zip archive.
173173
string path = UiTestHelpers.GetTracePath(_testAssemblyPath, TraceFileName);

tests/E2E Tests/WebAppUiTests/UiTestHelpers.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public static string GetTracePath(string testAssemblyLocation, string traceName)
245245
/// </summary>
246246
/// <param name="processQueue">queue of parent processes</param>
247247
[SupportedOSPlatform("windows")]
248-
public static void KillProcessTrees(Queue<Process> processQueue)
248+
public static async Task KillProcessTreesAsync(Queue<Process> processQueue)
249249
{
250250
Process currentProcess;
251251
while (processQueue.Count > 0)
@@ -258,7 +258,7 @@ public static void KillProcessTrees(Queue<Process> processQueue)
258258
{
259259
processQueue.Enqueue(child);
260260
}
261-
_ = currentProcess.WaitForExitAsync();
261+
await currentProcess.WaitForExitAsync();
262262
currentProcess.StandardOutput.Close();
263263
currentProcess.StandardError.Close();
264264

0 commit comments

Comments
 (0)