From cc8d59cdb2dc7422fcd3de9694a3ab37318cd63d Mon Sep 17 00:00:00 2001 From: Tony Hallett Date: Tue, 15 Feb 2022 12:18:19 +0000 Subject: [PATCH] add log message for missing test operation state ! ( and correct hasLoaded = false to true ) --- .../TestContainerDiscovery/TestContainerDiscoverer.cs | 9 ++++++++- SharedProject/Output/OutputToolWindowControl.xaml.cs | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/SharedProject/Impl/TestContainerDiscovery/TestContainerDiscoverer.cs b/SharedProject/Impl/TestContainerDiscovery/TestContainerDiscoverer.cs index 80e28384..cecc02e7 100644 --- a/SharedProject/Impl/TestContainerDiscovery/TestContainerDiscoverer.cs +++ b/SharedProject/Impl/TestContainerDiscovery/TestContainerDiscoverer.cs @@ -134,7 +134,7 @@ private async void OperationState_StateChanged(object sender, OperationStateChan if(e.State == TestOperationStates.TestExecutionCanceling) { await CombinedLogAsync("Test execution cancelling - running coverage will be cancelled."); - await reportGeneratorUtil .EndOfCoverageRunAsync(); // not necessarily true but get desired result + await reportGeneratorUtil.EndOfCoverageRunAsync(); // not necessarily true but get desired result fccEngine.StopCoverage(); } @@ -148,6 +148,13 @@ private async void OperationState_StateChanged(object sender, OperationStateChan { await TestExecutionFinishedAsync(e.Operation); } + + if (e.State == TestOperationStates.TestExecutionCancelAndFinished) + { + await CombinedLogAsync("There has been an issue running tests. See the Tests output window pane."); + await reportGeneratorUtil.EndOfCoverageRunAsync(); // not necessarily true but get desired result + fccEngine.StopCoverage(); + } } catch (Exception exception) { diff --git a/SharedProject/Output/OutputToolWindowControl.xaml.cs b/SharedProject/Output/OutputToolWindowControl.xaml.cs index 659cd72c..e71d8945 100644 --- a/SharedProject/Output/OutputToolWindowControl.xaml.cs +++ b/SharedProject/Output/OutputToolWindowControl.xaml.cs @@ -117,7 +117,7 @@ private void OutputToolWindowControl_Loaded(object sender, RoutedEventArgs e) { fccEngine.ReadyForReport(); FCCOutputBrowser.Visibility = Visibility.Visible; - hasLoaded = false; + hasLoaded = true; } }