Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit c7eef43

Browse files
committed
Attempt to fix flakey leak test that happens due to not waiting for the save and close operations to finish
Fixes VSTS #1006925 - Leak test random failure due to flakey test
1 parent 47e3301 commit c7eef43

File tree

1 file changed

+6
-2
lines changed
  • main/tests/UserInterfaceTests

1 file changed

+6
-2
lines changed

main/tests/UserInterfaceTests/Ide.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,12 @@ public static void OpenFile (FilePath file)
5252

5353
public static void CloseAll (bool exit = true)
5454
{
55-
Session.ExecuteCommand (FileCommands.SaveAll);
56-
Session.ExecuteCommand (FileCommands.CloseWorkspace);
55+
Session.RunAndWaitForTimer (() => {
56+
Session.ExecuteCommand (FileCommands.SaveAll);
57+
}, "Ide.Shell.SaveAll");
58+
Session.RunAndWaitForTimer (() => {
59+
Session.ExecuteCommand (FileCommands.CloseWorkspace);
60+
}, "Ide.Shell.CloseWorkspace");
5761
if (exit)
5862
Session.ExitApp ();
5963
}

0 commit comments

Comments
 (0)