Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public async Task Susi_B2C_LocalAccount_TodoAppFunctionsCorrectlyAsync()
Queue<Process> processes = new Queue<Process>();
if (serviceProcess != null) { processes.Enqueue(serviceProcess); }
if (clientProcess != null) { processes.Enqueue(clientProcess); }
await UiTestHelpers.KillProcessTreesAsync(processes);
UiTestHelpers.KillProcessTrees(processes);

// Stop tracing and export it into a zip archive.
string path = UiTestHelpers.GetTracePath(_testAssemblyPath, TraceFileName);
Expand Down
6 changes: 4 additions & 2 deletions tests/E2E Tests/WebAppUiTests/UiTestHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public static string GetTracePath(string testAssemblyLocation, string traceName)
/// </summary>
/// <param name="processQueue">queue of parent processes</param>
[SupportedOSPlatform("windows")]
public static async Task KillProcessTreesAsync(Queue<Process> processQueue)
public static void KillProcessTrees(Queue<Process> processQueue)
{
Process currentProcess;
while (processQueue.Count > 0)
Expand All @@ -258,7 +258,9 @@ public static async Task KillProcessTreesAsync(Queue<Process> processQueue)
{
processQueue.Enqueue(child);
}
await currentProcess.WaitForExitAsync();
// Do not call "await currentProcess.WaitForExitAsync();"
// as the web APIs never terminate by themselves (they are a loop
// that serves requests until the process is killed).
currentProcess.StandardOutput.Close();
currentProcess.StandardError.Close();

Expand Down
Loading