diff --git a/src/TestEngine/testcentric.engine/Runners/AssemblyRunner.cs b/src/TestEngine/testcentric.engine/Runners/AssemblyRunner.cs index b83eba9..d3b275b 100644 --- a/src/TestEngine/testcentric.engine/Runners/AssemblyRunner.cs +++ b/src/TestEngine/testcentric.engine/Runners/AssemblyRunner.cs @@ -204,6 +204,9 @@ public override void ForcedStop() { log.Error("Failed to stop the remote run. {0}", ExceptionHelper.BuildMessageAndStackTrace(e)); } + + _agent = null; + _remoteRunner = null; } } diff --git a/src/TestEngine/testcentric.engine/Services/TestEventDispatcher.cs b/src/TestEngine/testcentric.engine/Services/TestEventDispatcher.cs index 1f34f52..c2a9c26 100644 --- a/src/TestEngine/testcentric.engine/Services/TestEventDispatcher.cs +++ b/src/TestEngine/testcentric.engine/Services/TestEventDispatcher.cs @@ -32,6 +32,7 @@ public TestEventDispatcher() public void InitializeForRun() { + _runCancelled = false; _workItemTracker.Clear(); _allItemsComplete.Reset(); Listeners = new List(_listenerExtensions);