提交 b0b68e2b 编写于 作者: S Sam Harwell

Terminate the integration test process if cleanup fails

上级 264b33e7
......@@ -133,6 +133,18 @@ public void WaitForAllAsyncOperations(TimeSpan timeout, params string[] featureN
GetWaitingService().WaitForAllAsyncOperations(timeout, featureNames);
}
public void WaitForAllAsyncOperationsOrFail(TimeSpan timeout, params string[] featureNames)
{
try
{
WaitForAllAsyncOperations(timeout, featureNames);
}
catch (Exception e)
{
Environment.FailFast("Terminating test process due to unrecoverable timeout.", e);
}
}
private static void WaitForProjectSystem(TimeSpan timeout)
{
var operationProgressStatus = InvokeOnUIThread(_ => GetGlobalService<SVsOperationProgress, IVsOperationProgressStatusService>());
......
......@@ -48,6 +48,9 @@ public void WaitForAsyncOperations(TimeSpan timeout, string featuresToWaitFor, b
public void WaitForAllAsyncOperations(TimeSpan timeout, params string[] featureNames)
=> _inProc.WaitForAllAsyncOperations(timeout, featureNames);
public void WaitForAllAsyncOperationsOrFail(TimeSpan timeout, params string[] featureNames)
=> _inProc.WaitForAllAsyncOperationsOrFail(timeout, featureNames);
public void CleanUpWorkspace()
=> _inProc.CleanUpWorkspace();
......
......@@ -216,7 +216,7 @@ public void CleanUp()
Workspace.CleanUpWaitingService();
Workspace.CleanUpWorkspace();
SolutionExplorer.CleanUpOpenSolution();
Workspace.WaitForAllAsyncOperations(Helper.HangMitigatingTimeout);
Workspace.WaitForAllAsyncOperationsOrFail(Helper.HangMitigatingTimeout);
// Close any windows leftover from previous (failed) tests
InteractiveWindow.CloseInteractiveWindow();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册