From 387f56d0b4fa5a7dd87d73bba616b4b59f25e8ae Mon Sep 17 00:00:00 2001 From: samadala Date: Tue, 12 Dec 2017 18:10:44 +0530 Subject: [PATCH 1/8] Add logging to print stack trace --- .../Tasks/VSTestForwardingApp.cs | 2 +- .../DesignMode/DesignModeClient.cs | 6 +- .../DataCollectionAttachmentManager.cs | 4 +- .../DataCollection/DataCollectionManager.cs | 2 +- .../TestPlatformDataCollectionLogger.cs | 2 +- .../ExtensionFramework/VSExtensionManager.cs | 2 +- .../DataCollectionRequestHandler.cs | 10 ++- .../DataCollectionRequestSender.cs | 30 ++++++++ .../SocketCommunicationManager.cs | 2 +- .../TestRequestSender.cs | 72 +++++++++++++++++-- .../Client/ProxyDiscoveryManager.cs | 4 +- .../Client/ProxyExecutionManager.cs | 2 +- .../ProxyDataCollectionManager.cs | 2 +- .../Discovery/DiscovererEnumerator.cs | 4 +- .../XML/XmlPersistence.cs | 2 +- .../Utilities/AssemblyLoadWorker.cs | 2 +- .../common/Tracing/PlatformEqtTrace.cs | 2 +- .../Hosting/DefaultTestHostManager.cs | 3 +- .../Hosting/DotnetTestHostManager.cs | 3 +- .../CodeCoverageDataAttachmentsHandler.cs | 2 +- src/datacollector/Program.cs | 5 +- .../CommandLine/AssemblyMetadataProvider.cs | 2 +- ...ExecutionManagerWithDataCollectionTests.cs | 2 +- .../ProxyDataCollectionManagerTests.cs | 4 +- 24 files changed, 137 insertions(+), 34 deletions(-) diff --git a/src/Microsoft.TestPlatform.Build/Tasks/VSTestForwardingApp.cs b/src/Microsoft.TestPlatform.Build/Tasks/VSTestForwardingApp.cs index 1625063eee..7ab3596282 100644 --- a/src/Microsoft.TestPlatform.Build/Tasks/VSTestForwardingApp.cs +++ b/src/Microsoft.TestPlatform.Build/Tasks/VSTestForwardingApp.cs @@ -58,7 +58,7 @@ public void Cancel() } catch(ArgumentException ex) { - Tracing.Trace(string.Format("VSTest: Killing process throws ArgumentException with the following message {0}. It may be that process is not running", ex.Message)); + Tracing.Trace(string.Format("VSTest: Killing process throws ArgumentException with the following message {0}. It may be that process is not running", ex)); } } } diff --git a/src/Microsoft.TestPlatform.Client/DesignMode/DesignModeClient.cs b/src/Microsoft.TestPlatform.Client/DesignMode/DesignModeClient.cs index 8320aeaaca..419f6d24d6 100644 --- a/src/Microsoft.TestPlatform.Client/DesignMode/DesignModeClient.cs +++ b/src/Microsoft.TestPlatform.Client/DesignMode/DesignModeClient.cs @@ -136,7 +136,11 @@ private void ProcessRequests(ITestRequestManager testRequestManager) { var message = this.communicationManager.ReceiveMessage(); - EqtTrace.Info("DesignModeClient: Processing Message of message type: {0}", message.MessageType); + if (EqtTrace.IsInfoEnabled) + { + EqtTrace.Info("DesignModeClient.ProcessRequests: Processing Message: {0}", message); + } + switch (message.MessageType) { case MessageType.VersionCheck: diff --git a/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionAttachmentManager.cs b/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionAttachmentManager.cs index 56e6113c1e..0d7180d0a5 100644 --- a/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionAttachmentManager.cs +++ b/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionAttachmentManager.cs @@ -131,7 +131,7 @@ public List GetAttachments(DataCollectionContext dataCollectionCo } catch (Exception ex) { - EqtTrace.Error(ex.Message); + EqtTrace.Error("DataCollectionAttachmentManager.GetAttachments: Fail to get attachments: {0} ", ex); } List attachments = new List(); @@ -295,7 +295,7 @@ private void AddNewFileTransfer(FileTransferInformation fileTransferInfo, AsyncC catch (Exception ex) { this.LogError( - ex.Message, + ex.ToString(), uri, friendlyName, Guid.Parse(testCaseId)); diff --git a/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionManager.cs b/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionManager.cs index 0d529994e1..ba524f5948 100644 --- a/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionManager.cs +++ b/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionManager.cs @@ -450,7 +450,7 @@ private void LoadAndInitialize(DataCollectorSettings dataCollectorSettings, stri } // Log error. - dataCollectorInfo.Logger.LogError(this.dataCollectionEnvironmentContext.SessionDataCollectionContext, string.Format(CultureInfo.CurrentCulture, Resources.Resources.DataCollectorInitializationError, dataCollectorConfig.FriendlyName, ex.Message)); + dataCollectorInfo.Logger.LogError(this.dataCollectionEnvironmentContext.SessionDataCollectionContext, string.Format(CultureInfo.CurrentCulture, Resources.Resources.DataCollectorInitializationError, dataCollectorConfig.FriendlyName, ex.ToString())); // Dispose datacollector. dataCollectorInfo.DisposeDataCollector(); diff --git a/src/Microsoft.TestPlatform.Common/DataCollection/TestPlatformDataCollectionLogger.cs b/src/Microsoft.TestPlatform.Common/DataCollection/TestPlatformDataCollectionLogger.cs index c86d9ed87c..842bbda49e 100644 --- a/src/Microsoft.TestPlatform.Common/DataCollection/TestPlatformDataCollectionLogger.cs +++ b/src/Microsoft.TestPlatform.Common/DataCollection/TestPlatformDataCollectionLogger.cs @@ -95,7 +95,7 @@ public override void LogError(DataCollectionContext context, string text, Except CultureInfo.CurrentCulture, Resources.Resources.ReportDataCollectorException, exception.GetType(), - exception.Message, + exception.ToString(), text); this.SendTextMessage(context, message, TestMessageLevel.Error); } diff --git a/src/Microsoft.TestPlatform.Common/ExtensionFramework/VSExtensionManager.cs b/src/Microsoft.TestPlatform.Common/ExtensionFramework/VSExtensionManager.cs index 5ab02e1d03..6a52d3243d 100644 --- a/src/Microsoft.TestPlatform.Common/ExtensionFramework/VSExtensionManager.cs +++ b/src/Microsoft.TestPlatform.Common/ExtensionFramework/VSExtensionManager.cs @@ -62,7 +62,7 @@ public IEnumerable GetUnitTestExtensions() } catch (Exception ex) { - string message = string.Format(CultureInfo.CurrentCulture, Resources.FailedToFindInstalledUnitTestExtensions, ex.Message); + string message = string.Format(CultureInfo.CurrentCulture, Resources.FailedToFindInstalledUnitTestExtensions, ex.ToString()); throw new TestPlatformException(message, ex); } } diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/DataCollectionRequestHandler.cs b/src/Microsoft.TestPlatform.CommunicationUtilities/DataCollectionRequestHandler.cs index 6d5908923d..5b6245163f 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/DataCollectionRequestHandler.cs +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/DataCollectionRequestHandler.cs @@ -164,6 +164,12 @@ public void ProcessRequests() do { var message = this.communicationManager.ReceiveMessage(); + + if (EqtTrace.IsVerboseEnabled) + { + EqtTrace.Verbose("DataCollectionRequestHandler.ProcessRequests : Datacollector received message: {0}", message); + } + switch (message.MessageType) { case MessageType.BeforeTestRunStart: @@ -214,7 +220,7 @@ public void ProcessRequests() { EqtTrace.Error( "DataCollectionRequestHandler.ProcessRequests : Error occured during initialization of TestHost : {0}", - e.Message); + e); } } }, @@ -253,7 +259,7 @@ public void ProcessRequests() { if (EqtTrace.IsErrorEnabled) { - EqtTrace.Error("DataCollectionRequestHandler.ProcessRequests : {0}", ex.Message); + EqtTrace.Error("DataCollectionRequestHandler.ProcessRequests : {0}", ex.ToString()); } } diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/DataCollectionRequestSender.cs b/src/Microsoft.TestPlatform.CommunicationUtilities/DataCollectionRequestSender.cs index b39d6bb7b7..2dd998270b 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/DataCollectionRequestSender.cs +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/DataCollectionRequestSender.cs @@ -55,6 +55,11 @@ internal DataCollectionRequestSender(ICommunicationManager communicationManager, /// Port number public int InitializeCommunication() { + if (EqtTrace.IsVerboseEnabled) + { + EqtTrace.Verbose("DataCollectionRequestSender.InitializeCommunication : Initialize communication. "); + } + var endpoint = this.communicationManager.HostServer(new IPEndPoint(IPAddress.Loopback, 0)); this.communicationManager.AcceptClientAsync(); return endpoint.Port; @@ -67,6 +72,11 @@ public int InitializeCommunication() /// True, if Handler is connected public bool WaitForRequestHandlerConnection(int clientConnectionTimeout) { + if (EqtTrace.IsVerboseEnabled) + { + EqtTrace.Verbose("DataCollectionRequestSender.WaitForRequestHandlerConnection : Waiting for connection with timeout: {0}", clientConnectionTimeout); + } + return this.communicationManager.WaitForClientConnection(clientConnectionTimeout); } @@ -97,12 +107,22 @@ public BeforeTestRunStartResult SendBeforeTestRunStartAndGetResult(string settin var isDataCollectionStarted = false; BeforeTestRunStartResult result = null; + if (EqtTrace.IsVerboseEnabled) + { + EqtTrace.Verbose("DataCollectionRequestSender.SendBeforeTestRunStartAndGetResult : Send BeforeTestRunStart message with settingsXml: {0}", settingsXml); + } + this.communicationManager.SendMessage(MessageType.BeforeTestRunStart, settingsXml); while (!isDataCollectionStarted) { var message = this.communicationManager.ReceiveMessage(); + if (EqtTrace.IsVerboseEnabled) + { + EqtTrace.Verbose("DataCollectionRequestSender.SendBeforeTestRunStartAndGetResult : Received message: {0}", message); + } + if (message.MessageType == MessageType.DataCollectionMessage) { var dataCollectionMessageEventArgs = this.dataSerializer.DeserializePayload(message); @@ -124,6 +144,11 @@ public Collection SendAfterTestRunStartAndGetResult(ITestMessageE var isDataCollectionComplete = false; Collection attachmentSets = null; + if (EqtTrace.IsVerboseEnabled) + { + EqtTrace.Verbose("DataCollectionRequestSender.SendAfterTestRunStartAndGetResult : Send AfterTestRunEnd message with isCancelled: {0}", isCancelled); + } + this.communicationManager.SendMessage(MessageType.AfterTestRunEnd, isCancelled); // Cycle through the messages that the datacollector sends. @@ -132,6 +157,11 @@ public Collection SendAfterTestRunStartAndGetResult(ITestMessageE { var message = this.communicationManager.ReceiveMessage(); + if (EqtTrace.IsVerboseEnabled) + { + EqtTrace.Verbose("DataCollectionRequestSender.SendAfterTestRunStartAndGetResult : Received message: {0}", message); + } + if (message.MessageType == MessageType.DataCollectionMessage) { var dataCollectionMessageEventArgs = this.dataSerializer.DeserializePayload(message); diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs b/src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs index 1d7fe6efe6..093a19b7d2 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/SocketCommunicationManager.cs @@ -196,7 +196,7 @@ public async Task SetupClientAsync(IPEndPoint endpoint) } catch (Exception ex) { - EqtTrace.Verbose("Connection Failed with error {0}, retrying", ex.Message); + EqtTrace.Verbose("Connection Failed with error {0}, retrying", ex.ToString()); } } while ((this.tcpClient != null) && !this.tcpClient.Connected && watch.ElapsedMilliseconds < CONNECTIONRETRYTIMEOUT); diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/TestRequestSender.cs b/src/Microsoft.TestPlatform.CommunicationUtilities/TestRequestSender.cs index deae160a5c..41eedee9e3 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/TestRequestSender.cs +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/TestRequestSender.cs @@ -110,6 +110,11 @@ internal TestRequestSender( /// public int InitializeCommunication() { + if (EqtTrace.IsVerboseEnabled) + { + EqtTrace.Verbose("TestRequestSender.InitializeCommunication: initialize communication. "); + } + // this.clientExitCancellationSource = new CancellationTokenSource(); this.clientExitErrorMessage = string.Empty; @@ -133,6 +138,11 @@ public int InitializeCommunication() /// public bool WaitForRequestHandlerConnection(int connectionTimeout) { + if (EqtTrace.IsVerboseEnabled) + { + EqtTrace.Verbose("TestRequestSender.WaitForRequestHandlerConnection: waiting for connection with timeout: {0}", connectionTimeout); + } + return this.connected.Wait(connectionTimeout); } @@ -148,6 +158,11 @@ public void CheckVersionWithTestHost() { var message = this.dataSerializer.DeserializeMessage(args.Data); + if (EqtTrace.IsVerboseEnabled) + { + EqtTrace.Verbose("TestRequestSender.CheckVersionWithTestHost: onMessageReceived received message: {0}", message); + } + if (message.MessageType == MessageType.VersionCheck) { this.protocolVersion = this.dataSerializer.DeserializePayload(message); @@ -242,6 +257,11 @@ public void InitializeExecution(IEnumerable pathToAdditionalExtensions) MessageType.ExecutionInitialize, pathToAdditionalExtensions, this.protocolVersion); + if (EqtTrace.IsVerboseEnabled) + { + EqtTrace.Verbose("TestRequestSender.InitializeExecution: Sending initializing execution with message: {0}", message); + } + this.channel.Send(message); } @@ -260,6 +280,12 @@ public void StartTestRun(TestRunCriteriaWithSources runCriteria, ITestRunEventsH MessageType.StartTestExecutionWithSources, runCriteria, this.protocolVersion); + + if (EqtTrace.IsVerboseEnabled) + { + EqtTrace.Verbose("TestRequestSender.StartTestRun: Sending test run with message: {0}", message); + } + this.channel.Send(message); } @@ -278,18 +304,33 @@ public void StartTestRun(TestRunCriteriaWithTests runCriteria, ITestRunEventsHan MessageType.StartTestExecutionWithTests, runCriteria, this.protocolVersion); + if (EqtTrace.IsVerboseEnabled) + { + EqtTrace.Verbose("TestRequestSender.StartTestRun: Sending test run with message: {0}", message); + } + this.channel.Send(message); } /// public void SendTestRunCancel() { + if (EqtTrace.IsVerboseEnabled) + { + EqtTrace.Verbose("TestRequestSender.SendTestRunCancel: Sending test run cancel."); + } + this.channel?.Send(this.dataSerializer.SerializeMessage(MessageType.CancelTestRun)); } /// public void SendTestRunAbort() { + if (EqtTrace.IsVerboseEnabled) + { + EqtTrace.Verbose("TestRequestSender.SendTestRunAbort: Sending test run abort."); + } + this.channel?.Send(this.dataSerializer.SerializeMessage(MessageType.AbortTestRun)); } @@ -300,6 +341,11 @@ public void EndSession() { if (!this.IsOperationComplete()) { + if (EqtTrace.IsVerboseEnabled) + { + EqtTrace.Verbose("TestRequestSender.EndSession: Sending end session."); + } + this.channel.Send(this.dataSerializer.SerializeMessage(MessageType.SessionEnd)); } } @@ -309,7 +355,12 @@ public void OnClientProcessExit(string stdError) { // This method is called on test host exit. If test host has any errors, stdError // provides the crash call stack. - EqtTrace.Info("TestRequestSender.OnClientProcessExit: Test host process exited. Standard error: " + stdError); + if (EqtTrace.IsInfoEnabled) + { + EqtTrace.Info("TestRequestSender.OnClientProcessExit: Test host process exited. Standard error: " + + stdError); + } + this.clientExitErrorMessage = stdError; this.clientExited.Set(); @@ -340,6 +391,10 @@ private void OnExecutionMessageReceived(object sender, MessageReceivedEventArgs try { var rawMessage = messageReceived.Data; + if (EqtTrace.IsVerboseEnabled) + { + EqtTrace.Verbose("TestRequestSender.OnExecutionMessageReceived: Received message: {0}", rawMessage); + } // Send raw message first to unblock handlers waiting to send message to IDEs testRunEventsHandler.HandleRawMessage(rawMessage); @@ -375,6 +430,10 @@ private void OnExecutionMessageReceived(object sender, MessageReceivedEventArgs MessageType.LaunchAdapterProcessWithDebuggerAttachedCallback, processId, this.protocolVersion); + if (EqtTrace.IsVerboseEnabled) + { + EqtTrace.Verbose("TestRequestSender.OnExecutionMessageReceived: Sending LaunchAdapterProcessWithDebuggerAttachedCallback message: {0}", data); + } this.channel.Send(data); break; @@ -393,9 +452,9 @@ private void OnDiscoveryMessageReceived(ITestDiscoveryEventsHandler2 discoveryEv var rawMessage = args.Data; // Currently each of the operations are not separate tasks since they should not each take much time. This is just a notification. - if (EqtTrace.IsInfoEnabled) + if (EqtTrace.IsVerboseEnabled) { - EqtTrace.Info("TestRequestSender: Received message: {0}", rawMessage); + EqtTrace.Verbose("TestRequestSender.OnDiscoveryMessageReceived: Received message: {0}", rawMessage); } // Send raw message first to unblock handlers waiting to send message to IDEs @@ -539,6 +598,11 @@ private bool IsOperationComplete() private void SetOperationComplete() { // Complete the currently ongoing operation (Discovery/Execution) + if (EqtTrace.IsVerboseEnabled) + { + EqtTrace.Verbose("TestRequestSender.SetOperationComplete: Setting operation complete."); + } + Interlocked.CompareExchange(ref this.operationCompleted, 1, 0); } @@ -563,4 +627,4 @@ private void SetCommunicationEndPoint() } } } -} +} \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyDiscoveryManager.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyDiscoveryManager.cs index 82126e78da..c62c0cb4dd 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyDiscoveryManager.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyDiscoveryManager.cs @@ -111,7 +111,7 @@ public void DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEve EqtTrace.Error("ProxyDiscoveryManager.DiscoverTests: Failed to discover tests: {0}", exception); // Log to vs ide test output - var testMessagePayload = new TestMessagePayload { MessageLevel = TestMessageLevel.Error, Message = exception.Message }; + var testMessagePayload = new TestMessagePayload { MessageLevel = TestMessageLevel.Error, Message = exception.ToString() }; var rawMessage = this.dataSerializer.SerializePayload(MessageType.TestMessage, testMessagePayload); this.HandleRawMessage(rawMessage); @@ -120,7 +120,7 @@ public void DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEve // Aborted is `true`: in case of parallel discovery (or non shared host), an aborted message ensures another discovery manager // created to replace the current one. This will help if the current discovery manager is aborted due to irreparable error // and the test host is lost as well. - this.HandleLogMessage(TestMessageLevel.Error, exception.Message); + this.HandleLogMessage(TestMessageLevel.Error, exception.ToString()); var discoveryCompleteEventsArgs = new DiscoveryCompleteEventArgs(-1, true); diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManager.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManager.cs index c64ec9f2c7..0252c39484 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManager.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManager.cs @@ -152,7 +152,7 @@ public virtual int StartTestRun(TestRunCriteria testRunCriteria, ITestRunEventsH catch (Exception exception) { EqtTrace.Error("ProxyExecutionManager.StartTestRun: Failed to start test run: {0}", exception); - this.LogMessage(TestMessageLevel.Error, exception.Message); + this.LogMessage(TestMessageLevel.Error, exception.ToString()); // Send a run complete to caller. Similar logic is also used in ParallelProxyExecutionManager.StartTestRunOnConcurrentManager // Aborted is `true`: in case of parallel run (or non shared host), an aborted message ensures another execution manager diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ProxyDataCollectionManager.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ProxyDataCollectionManager.cs index 687066c8ce..691b1cd58a 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ProxyDataCollectionManager.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ProxyDataCollectionManager.cs @@ -230,7 +230,7 @@ private void HandleExceptionMessage(ITestMessageEventHandler runEventsHandler, E EqtTrace.Error(exception); } - runEventsHandler.HandleLogMessage(ObjectModel.Logging.TestMessageLevel.Error, exception.Message); + runEventsHandler.HandleLogMessage(ObjectModel.Logging.TestMessageLevel.Error, exception.ToString()); } private IList GetCommandLineArguments(int portNumber) diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Discovery/DiscovererEnumerator.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Discovery/DiscovererEnumerator.cs index 8ff5b92acd..1060128bef 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Discovery/DiscovererEnumerator.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Discovery/DiscovererEnumerator.cs @@ -129,7 +129,7 @@ private void LoadTestsFromAnExtension(string extensionAssembly, IEnumerable files) { if (EqtTrace.IsErrorEnabled) { - EqtTrace.Error("CodeCoverageDataCollectorAttachmentsHandler: Failed to load datacollector of type : {0} from location : {1}. Error : ", CodeCoverageAnalysisAssemblyName, assemblyPath, ex.Message); + EqtTrace.Error("CodeCoverageDataCollectorAttachmentsHandler: Failed to load datacollector of type : {0} from location : {1}. Error : {2}", CodeCoverageAnalysisAssemblyName, assemblyPath, ex.ToString()); } } diff --git a/src/datacollector/Program.cs b/src/datacollector/Program.cs index ce3fe24ea1..06a5db6d68 100644 --- a/src/datacollector/Program.cs +++ b/src/datacollector/Program.cs @@ -55,13 +55,10 @@ public static void Main(string[] args) WaitForDebuggerIfEnabled(); Run(args); } - catch (SocketException ex) - { - EqtTrace.Error("DataCollector: Socket exception is thrown : {0}", ex); - } catch (Exception ex) { EqtTrace.Error("DataCollector: Error occured during initialization of Datacollector : {0}", ex); + throw; } } diff --git a/src/vstest.console/CommandLine/AssemblyMetadataProvider.cs b/src/vstest.console/CommandLine/AssemblyMetadataProvider.cs index 10a5f145cc..ee4e0b570e 100644 --- a/src/vstest.console/CommandLine/AssemblyMetadataProvider.cs +++ b/src/vstest.console/CommandLine/AssemblyMetadataProvider.cs @@ -243,7 +243,7 @@ public Architecture GetArchitectureForSource(string imagePath) //Ignore all exception EqtTrace.Info( "GetArchitectureForSource: Returning default:{0}. Unhandled exception: {1}.", - archType, ex.Message); + archType, ex); } return archType; diff --git a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Client/ProxyExecutionManagerWithDataCollectionTests.cs b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Client/ProxyExecutionManagerWithDataCollectionTests.cs index 5d645754a9..18c14659b0 100644 --- a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Client/ProxyExecutionManagerWithDataCollectionTests.cs +++ b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Client/ProxyExecutionManagerWithDataCollectionTests.cs @@ -108,7 +108,7 @@ public void InitializeShouldSaveExceptionMessagesIfThrownByDataCollectionProcess proxyExecutionManager.Initialize(); Assert.IsNotNull(proxyExecutionManager.DataCollectionRunEventsHandler.Messages); Assert.AreEqual(TestMessageLevel.Error, proxyExecutionManager.DataCollectionRunEventsHandler.Messages[0].Item1); - Assert.AreEqual("MyException", proxyExecutionManager.DataCollectionRunEventsHandler.Messages[0].Item2); + StringAssert.Contains(proxyExecutionManager.DataCollectionRunEventsHandler.Messages[0].Item2, "MyException"); } [TestMethod] diff --git a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/ProxyDataCollectionManagerTests.cs b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/ProxyDataCollectionManagerTests.cs index ba778d8021..68e4e3d075 100644 --- a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/ProxyDataCollectionManagerTests.cs +++ b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/ProxyDataCollectionManagerTests.cs @@ -135,7 +135,7 @@ public void BeforeTestRunStartsShouldInvokeRunEventsHandlerIfExceptionIsThrown() var result = this.proxyDataCollectionManager.BeforeTestRunStart(true, true, mockRunEventsHandler.Object); - mockRunEventsHandler.Verify(eh => eh.HandleLogMessage(TestMessageLevel.Error, "Exception of type 'System.Exception' was thrown."), Times.Once); + mockRunEventsHandler.Verify(eh => eh.HandleLogMessage(TestMessageLevel.Error, It.IsRegex("Exception of type 'System.Exception' was thrown..*")), Times.Once); Assert.AreEqual(0, result.EnvironmentVariables.Count); Assert.AreEqual(false, result.AreTestCaseLevelEventsRequired); Assert.AreEqual(0, result.DataCollectionEventsPort); @@ -171,7 +171,7 @@ public void AfterTestRunEndShouldInvokeRunEventsHandlerIfExceptionIsThrown() var result = this.proxyDataCollectionManager.AfterTestRunEnd(false, mockRunEventsHandler.Object); - mockRunEventsHandler.Verify(eh => eh.HandleLogMessage(TestMessageLevel.Error, "Exception of type 'System.Exception' was thrown."), Times.Once); + mockRunEventsHandler.Verify(eh => eh.HandleLogMessage(TestMessageLevel.Error, It.IsRegex("Exception of type 'System.Exception' was thrown..*")), Times.Once); } From cac257490890d24a3e2319cec43bc9263877ed9b Mon Sep 17 00:00:00 2001 From: samadala Date: Wed, 20 Dec 2017 17:56:07 +0530 Subject: [PATCH 2/8] Increase datacollector communication connection timeout --- .../ProxyDataCollectionManager.cs | 18 +++++++++++++++--- src/datacollector/Program.cs | 16 ++++++++-------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ProxyDataCollectionManager.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ProxyDataCollectionManager.cs index 691b1cd58a..c726b80f9e 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ProxyDataCollectionManager.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ProxyDataCollectionManager.cs @@ -100,7 +100,7 @@ internal ProxyDataCollectionManager(IRequestData requestData, string settingsXml this.dataCollectionRequestSender = dataCollectionRequestSender; this.dataCollectionLauncher = dataCollectionLauncher; this.processHelper = processHelper; - this.connectionTimeout = 5 * 1000; + this.connectionTimeout = 30 * 1000; this.LogEnabledDataCollectors(); } @@ -182,8 +182,16 @@ public void Initialize() // Warn the user that execution will wait for debugger attach. var processId = this.dataCollectionLauncher.LaunchDataCollector(null, this.GetCommandLineArguments(port)); + IncreaseConnectionTimeoutIfRequired(processId); + + this.dataCollectionRequestSender.WaitForRequestHandlerConnection(this.connectionTimeout); + } + + private void IncreaseConnectionTimeoutIfRequired(int processId) + { var dataCollectorDebugEnabled = Environment.GetEnvironmentVariable("VSTEST_DATACOLLECTOR_DEBUG"); - if (!string.IsNullOrEmpty(dataCollectorDebugEnabled) && dataCollectorDebugEnabled.Equals("1", StringComparison.Ordinal)) + if (!string.IsNullOrEmpty(dataCollectorDebugEnabled) && + dataCollectorDebugEnabled.Equals("1", StringComparison.Ordinal)) { ConsoleOutput.Instance.WriteLine(CrossPlatEngineResources.DataCollectorDebuggerWarning, OutputLevel.Warning); ConsoleOutput.Instance.WriteLine( @@ -194,7 +202,11 @@ public void Initialize() this.connectionTimeout = 5 * this.connectionTimeout; } - this.dataCollectionRequestSender.WaitForRequestHandlerConnection(this.connectionTimeout); + var userSpecifiedTimeout = Environment.GetEnvironmentVariable("VSTEST_DATACOLLECTOR_CONNECTION_TIMEOUT"); + if (!string.IsNullOrEmpty(userSpecifiedTimeout) && Int32.TryParse(userSpecifiedTimeout, out int result)) + { + this.connectionTimeout = result * 1000; + } } private void InvokeDataCollectionServiceAction(Action action, ITestMessageEventHandler runEventsHandler) diff --git a/src/datacollector/Program.cs b/src/datacollector/Program.cs index 06a5db6d68..792ee85ada 100644 --- a/src/datacollector/Program.cs +++ b/src/datacollector/Program.cs @@ -65,7 +65,13 @@ public static void Main(string[] args) private static void Run(string[] args) { var argsDictionary = CommandLineArgumentsHelper.GetArgumentsDictionary(args); - var requestHandler = DataCollectionRequestHandler.Create(new SocketCommunicationManager(), new MessageSink()); + + // Setup logging if enabled + string logFile; + if (argsDictionary.TryGetValue(LogFileArgument, out logFile)) + { + EqtTrace.InitializeVerboseTrace(logFile); + } // Attach to exit of parent process var parentProcessId = CommandLineArgumentsHelper.GetIntArgFromDict(argsDictionary, ParentProcessArgument); @@ -80,13 +86,6 @@ private static void Run(string[] args) Environment.Exit(1); }); - // Setup logging if enabled - string logFile; - if (argsDictionary.TryGetValue(LogFileArgument, out logFile)) - { - EqtTrace.InitializeVerboseTrace(logFile); - } - // Get server port and initialize communication. string portValue; int port = argsDictionary.TryGetValue(PortArgument, out portValue) ? int.Parse(portValue) : 0; @@ -96,6 +95,7 @@ private static void Run(string[] args) throw new ArgumentException("Incorrect/No Port number"); } + var requestHandler = DataCollectionRequestHandler.Create(new SocketCommunicationManager(), new MessageSink()); requestHandler.InitializeCommunication(port); // Can only do this after InitializeCommunication because datacollector cannot "Send Log" unless communications are initialized From 827bdfa45f2c2c2593445cf2163599156f9f6c36 Mon Sep 17 00:00:00 2001 From: samadala Date: Wed, 20 Dec 2017 18:33:43 +0530 Subject: [PATCH 3/8] Update unit tests --- .../DataCollection/ProxyDataCollectionManager.cs | 11 ++++++----- .../DataCollection/ProxyDataCollectionManagerTests.cs | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ProxyDataCollectionManager.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ProxyDataCollectionManager.cs index c726b80f9e..2f260cac81 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ProxyDataCollectionManager.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ProxyDataCollectionManager.cs @@ -34,6 +34,7 @@ internal class ProxyDataCollectionManager : IProxyDataCollectionManager private const string PortOption = "--port"; private const string DiagOption = "--diag"; private const string ParentProcessIdOption = "--parentprocessid"; + public const int DataCollectorConnectionTimeout = 30 * 1000; // In milliseconds. private IDataCollectionRequestSender dataCollectionRequestSender; private IDataCollectionLauncher dataCollectionLauncher; @@ -100,7 +101,7 @@ internal ProxyDataCollectionManager(IRequestData requestData, string settingsXml this.dataCollectionRequestSender = dataCollectionRequestSender; this.dataCollectionLauncher = dataCollectionLauncher; this.processHelper = processHelper; - this.connectionTimeout = 30 * 1000; + this.connectionTimeout = ProxyDataCollectionManager.DataCollectorConnectionTimeout; this.LogEnabledDataCollectors(); } @@ -182,13 +183,14 @@ public void Initialize() // Warn the user that execution will wait for debugger attach. var processId = this.dataCollectionLauncher.LaunchDataCollector(null, this.GetCommandLineArguments(port)); - IncreaseConnectionTimeoutIfRequired(processId); + ChangeConnectionTimeoutIfRequired(processId); this.dataCollectionRequestSender.WaitForRequestHandlerConnection(this.connectionTimeout); } - private void IncreaseConnectionTimeoutIfRequired(int processId) + private void ChangeConnectionTimeoutIfRequired(int processId) { + // Increase connection timeout when debugging is enabled. var dataCollectorDebugEnabled = Environment.GetEnvironmentVariable("VSTEST_DATACOLLECTOR_DEBUG"); if (!string.IsNullOrEmpty(dataCollectorDebugEnabled) && dataCollectorDebugEnabled.Equals("1", StringComparison.Ordinal)) @@ -197,11 +199,10 @@ private void IncreaseConnectionTimeoutIfRequired(int processId) ConsoleOutput.Instance.WriteLine( string.Format("Process Id: {0}, Name: {1}", processId, this.processHelper.GetProcessName(processId)), OutputLevel.Information); - - // Increase connection timeout when debugging is enabled. this.connectionTimeout = 5 * this.connectionTimeout; } + // Change connection timeout if user specified environment variable VSTEST_DATACOLLECTOR_CONNECTION_TIMEOUT. var userSpecifiedTimeout = Environment.GetEnvironmentVariable("VSTEST_DATACOLLECTOR_CONNECTION_TIMEOUT"); if (!string.IsNullOrEmpty(userSpecifiedTimeout) && Int32.TryParse(userSpecifiedTimeout, out int result)) { diff --git a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/ProxyDataCollectionManagerTests.cs b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/ProxyDataCollectionManagerTests.cs index 68e4e3d075..fd9644cf64 100644 --- a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/ProxyDataCollectionManagerTests.cs +++ b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/ProxyDataCollectionManagerTests.cs @@ -51,7 +51,7 @@ public void InitializeShouldInitializeCommunication() this.proxyDataCollectionManager.Initialize(); this.mockDataCollectionLauncher.Verify(x => x.LaunchDataCollector(It.IsAny>(), It.IsAny>()), Times.Once); - this.mockDataCollectionRequestSender.Verify(x => x.WaitForRequestHandlerConnection(5000), Times.Once); + this.mockDataCollectionRequestSender.Verify(x => x.WaitForRequestHandlerConnection(ProxyDataCollectionManager.DataCollectorConnectionTimeout), Times.Once); } [TestMethod] @@ -79,7 +79,7 @@ public void InitializeShouldPassDiagArgumentsIfDiagIsEnabled() It.IsAny>(), It.Is>(list => list.Contains("--diag"))), Times.Once); - this.mockDataCollectionRequestSender.Verify(x => x.WaitForRequestHandlerConnection(5000), Times.Once); + this.mockDataCollectionRequestSender.Verify(x => x.WaitForRequestHandlerConnection(ProxyDataCollectionManager.DataCollectorConnectionTimeout), Times.Once); } finally { From e52f9f903807ee5f32c4fc3d0ca4016440cc9a7b Mon Sep 17 00:00:00 2001 From: samadala Date: Tue, 2 Jan 2018 15:42:02 +0530 Subject: [PATCH 4/8] Remove unneccesary using statement --- .../TestRequestSender.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/TestRequestSender.cs b/src/Microsoft.TestPlatform.CommunicationUtilities/TestRequestSender.cs index 41eedee9e3..db50f31242 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/TestRequestSender.cs +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/TestRequestSender.cs @@ -6,7 +6,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CommunicationUtilities using System; using System.Collections.Generic; using System.Globalization; - using System.Net; using System.Threading; using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.Interfaces; From d8fa0bfa5136c6cc23f7b62c38070975ae3e1255 Mon Sep 17 00:00:00 2001 From: samadala Date: Thu, 4 Jan 2018 19:30:14 +0530 Subject: [PATCH 5/8] Throw exception on failed to connect datacollector --- .../DataCollection/DataCollectionManager.cs | 2 +- .../TestPlatformDataCollectionLogger.cs | 2 +- .../ExtensionFramework/VSExtensionManager.cs | 2 +- .../ProxyDataCollectionManager.cs | 14 ++++++--- .../Resources/Resources.Designer.cs | 9 ++++++ .../Resources/Resources.resx | 3 ++ .../Resources/xlf/Resources.cs.xlf | 7 ++++- .../Resources/xlf/Resources.de.xlf | 7 ++++- .../Resources/xlf/Resources.es.xlf | 7 ++++- .../Resources/xlf/Resources.fr.xlf | 7 ++++- .../Resources/xlf/Resources.it.xlf | 7 ++++- .../Resources/xlf/Resources.ja.xlf | 7 ++++- .../Resources/xlf/Resources.ko.xlf | 7 ++++- .../Resources/xlf/Resources.pl.xlf | 7 ++++- .../Resources/xlf/Resources.pt-BR.xlf | 7 ++++- .../Resources/xlf/Resources.ru.xlf | 7 ++++- .../Resources/xlf/Resources.tr.xlf | 7 ++++- .../Resources/xlf/Resources.xlf | 5 +++ .../Resources/xlf/Resources.zh-Hans.xlf | 7 ++++- .../Resources/xlf/Resources.zh-Hant.xlf | 7 ++++- .../ProxyDataCollectionManagerTests.cs | 31 +++++++++++++++++++ 21 files changed, 139 insertions(+), 20 deletions(-) diff --git a/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionManager.cs b/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionManager.cs index ba524f5948..9ffe6861cd 100644 --- a/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionManager.cs +++ b/src/Microsoft.TestPlatform.Common/DataCollection/DataCollectionManager.cs @@ -450,7 +450,7 @@ private void LoadAndInitialize(DataCollectorSettings dataCollectorSettings, stri } // Log error. - dataCollectorInfo.Logger.LogError(this.dataCollectionEnvironmentContext.SessionDataCollectionContext, string.Format(CultureInfo.CurrentCulture, Resources.Resources.DataCollectorInitializationError, dataCollectorConfig.FriendlyName, ex.ToString())); + dataCollectorInfo.Logger.LogError(this.dataCollectionEnvironmentContext.SessionDataCollectionContext, string.Format(CultureInfo.CurrentCulture, Resources.Resources.DataCollectorInitializationError, dataCollectorConfig.FriendlyName, ex)); // Dispose datacollector. dataCollectorInfo.DisposeDataCollector(); diff --git a/src/Microsoft.TestPlatform.Common/DataCollection/TestPlatformDataCollectionLogger.cs b/src/Microsoft.TestPlatform.Common/DataCollection/TestPlatformDataCollectionLogger.cs index 842bbda49e..9b63ae4a10 100644 --- a/src/Microsoft.TestPlatform.Common/DataCollection/TestPlatformDataCollectionLogger.cs +++ b/src/Microsoft.TestPlatform.Common/DataCollection/TestPlatformDataCollectionLogger.cs @@ -95,7 +95,7 @@ public override void LogError(DataCollectionContext context, string text, Except CultureInfo.CurrentCulture, Resources.Resources.ReportDataCollectorException, exception.GetType(), - exception.ToString(), + exception, text); this.SendTextMessage(context, message, TestMessageLevel.Error); } diff --git a/src/Microsoft.TestPlatform.Common/ExtensionFramework/VSExtensionManager.cs b/src/Microsoft.TestPlatform.Common/ExtensionFramework/VSExtensionManager.cs index 6a52d3243d..75e3b0825f 100644 --- a/src/Microsoft.TestPlatform.Common/ExtensionFramework/VSExtensionManager.cs +++ b/src/Microsoft.TestPlatform.Common/ExtensionFramework/VSExtensionManager.cs @@ -62,7 +62,7 @@ public IEnumerable GetUnitTestExtensions() } catch (Exception ex) { - string message = string.Format(CultureInfo.CurrentCulture, Resources.FailedToFindInstalledUnitTestExtensions, ex.ToString()); + string message = string.Format(CultureInfo.CurrentCulture, Resources.FailedToFindInstalledUnitTestExtensions, ex); throw new TestPlatformException(message, ex); } } diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ProxyDataCollectionManager.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ProxyDataCollectionManager.cs index 2f260cac81..89b59fde03 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ProxyDataCollectionManager.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ProxyDataCollectionManager.cs @@ -6,6 +6,7 @@ namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.DataCollection using System; using System.Collections.Generic; using System.Collections.ObjectModel; + using System.Globalization; using System.IO; using System.Linq; using System.Reflection; @@ -35,6 +36,8 @@ internal class ProxyDataCollectionManager : IProxyDataCollectionManager private const string DiagOption = "--diag"; private const string ParentProcessIdOption = "--parentprocessid"; public const int DataCollectorConnectionTimeout = 30 * 1000; // In milliseconds. + public const string TimeoutEnvironmentVaribleName = "VSTEST_DATACOLLECTOR_CONNECTION_TIMEOUT"; + public const string DebugEnvironmentVaribleName = "VSTEST_DATACOLLECTOR_DEBUG"; private IDataCollectionRequestSender dataCollectionRequestSender; private IDataCollectionLauncher dataCollectionLauncher; @@ -184,14 +187,17 @@ public void Initialize() var processId = this.dataCollectionLauncher.LaunchDataCollector(null, this.GetCommandLineArguments(port)); ChangeConnectionTimeoutIfRequired(processId); - - this.dataCollectionRequestSender.WaitForRequestHandlerConnection(this.connectionTimeout); + var connected = this.dataCollectionRequestSender.WaitForRequestHandlerConnection(this.connectionTimeout); + if (connected == false) + { + throw new TestPlatformException(string.Format(CultureInfo.CurrentUICulture, CrossPlatEngineResources.FailedToConnectDataCollector)); + } } private void ChangeConnectionTimeoutIfRequired(int processId) { // Increase connection timeout when debugging is enabled. - var dataCollectorDebugEnabled = Environment.GetEnvironmentVariable("VSTEST_DATACOLLECTOR_DEBUG"); + var dataCollectorDebugEnabled = Environment.GetEnvironmentVariable(DebugEnvironmentVaribleName); if (!string.IsNullOrEmpty(dataCollectorDebugEnabled) && dataCollectorDebugEnabled.Equals("1", StringComparison.Ordinal)) { @@ -203,7 +209,7 @@ private void ChangeConnectionTimeoutIfRequired(int processId) } // Change connection timeout if user specified environment variable VSTEST_DATACOLLECTOR_CONNECTION_TIMEOUT. - var userSpecifiedTimeout = Environment.GetEnvironmentVariable("VSTEST_DATACOLLECTOR_CONNECTION_TIMEOUT"); + var userSpecifiedTimeout = Environment.GetEnvironmentVariable(TimeoutEnvironmentVaribleName); if (!string.IsNullOrEmpty(userSpecifiedTimeout) && Int32.TryParse(userSpecifiedTimeout, out int result)) { this.connectionTimeout = result * 1000; diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/Resources.Designer.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/Resources.Designer.cs index 7ede748973..bba27dfc3c 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/Resources.Designer.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/Resources.Designer.cs @@ -133,6 +133,15 @@ internal static string ExecutionThreadApartmentStateNotSupportedForFramework { } } + /// + /// Looks up a localized string similar to Failed to connect datacollector.. + /// + internal static string FailedToConnectDataCollector { + get { + return ResourceManager.GetString("FailedToConnectDataCollector", resourceCulture); + } + } + /// /// Looks up a localized string similar to Failed to launch testhost with error: {0}. /// diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/Resources.resx b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/Resources.resx index d757b30a89..73f35709c6 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/Resources.resx +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/Resources.resx @@ -189,4 +189,7 @@ You are using an older version of Microsoft.NET.Test.Sdk. Kindly move to a version equal or greater than 15.3.0. + + Failed to connect datacollector. + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.cs.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.cs.xlf index 19419347c4..581823b5e1 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.cs.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.cs.xlf @@ -1,4 +1,4 @@ - +
@@ -191,6 +191,11 @@ Používáte starší verzi sady Microsoft.NET.Test.Sdk. Přejděte prosím na verzi 15.3.0 nebo vyšší. + + Failed to connect datacollector. + Failed to connect datacollector. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.de.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.de.xlf index 911c9621ed..28fe3dadbf 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.de.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.de.xlf @@ -1,4 +1,4 @@ - +
@@ -191,6 +191,11 @@ Sie verwenden eine ältere Version von Microsoft.NET.Test.Sdk. Wechseln Sie zu Version 15.3.0 oder höher. + + Failed to connect datacollector. + Failed to connect datacollector. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.es.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.es.xlf index 3ae4979e84..2c5d410659 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.es.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.es.xlf @@ -1,4 +1,4 @@ - +
@@ -191,6 +191,11 @@ Está utilizando una versión anterior de Microsoft.NET.Test.Sdk. Cámbiese a una versión igual o superior a 15.3.0. + + Failed to connect datacollector. + Failed to connect datacollector. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.fr.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.fr.xlf index 65d27a36e9..cd12be97a6 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.fr.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.fr.xlf @@ -1,4 +1,4 @@ - +
@@ -191,6 +191,11 @@ Vous utilisez une ancienne version de Microsoft.NET.Test.Sdk. Passez à une version égale ou supérieure à la version 15.3.0. + + Failed to connect datacollector. + Failed to connect datacollector. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.it.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.it.xlf index 37fca9c862..910c9d6f49 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.it.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.it.xlf @@ -1,4 +1,4 @@ - +
@@ -191,6 +191,11 @@ La versione di Microsoft.NET.Test.Sdk è obsoleta. Passare alla versione 15.3.0 o a una versione successiva. + + Failed to connect datacollector. + Failed to connect datacollector. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ja.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ja.xlf index 16c6cfd130..294e71d28d 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ja.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ja.xlf @@ -1,4 +1,4 @@ - +
@@ -191,6 +191,11 @@ Microsoft.NET.Test.Sdk の古いバージョンを使用しています。15.3.0 以降のバージョンに移行することをお勧めします。 + + Failed to connect datacollector. + Failed to connect datacollector. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ko.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ko.xlf index a7701adcd1..e8faf84c72 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ko.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ko.xlf @@ -1,4 +1,4 @@ - +
@@ -191,6 +191,11 @@ 이전 버전의 Microsoft.NET.Test.Sdk를 사용하고 있습니다. 15.3.0 이상 버전으로 이동하세요. + + Failed to connect datacollector. + Failed to connect datacollector. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pl.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pl.xlf index 9ea1fa0101..aa90f1adf0 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pl.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pl.xlf @@ -1,4 +1,4 @@ - +
@@ -191,6 +191,11 @@ Używamy starszej wersji zestawu Microsoft.NET.Test.Sdk. Przejdź na wersję 15.3.0 lub nowszą. + + Failed to connect datacollector. + Failed to connect datacollector. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pt-BR.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pt-BR.xlf index 81a974b795..5210e6d77e 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pt-BR.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pt-BR.xlf @@ -1,4 +1,4 @@ - +
@@ -191,6 +191,11 @@ Você está usando uma versão mais antiga do Microsoft.NET.Test.Sdk. Mude para uma versão igual ou maior que 15.3.0. + + Failed to connect datacollector. + Failed to connect datacollector. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ru.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ru.xlf index d7b7025d06..135ac1430b 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ru.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ru.xlf @@ -1,4 +1,4 @@ - +
@@ -191,6 +191,11 @@ Вы используете более старую версию Microsoft.NET.Test.Sdk. Перейдите на версию 15.3.0 или более позднюю. + + Failed to connect datacollector. + Failed to connect datacollector. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.tr.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.tr.xlf index b1e65c204a..78f684d3fe 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.tr.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.tr.xlf @@ -1,4 +1,4 @@ - +
@@ -191,6 +191,11 @@ Eski bir Microsoft.NET.Test.Sdk sürümü kullanıyorsunuz. Lütfen 15.3.0 veya daha yeni bir sürüme geçin. + + Failed to connect datacollector. + Failed to connect datacollector. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.xlf index 9065983d4e..381ab9e462 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.xlf @@ -102,6 +102,11 @@ You are using an older version of Microsoft.NET.Test.Sdk. Kindly move to a version equal or greater than 15.3.0 + + Failed to connect datacollector. + Failed to connect datacollector. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hans.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hans.xlf index 2794a7edd1..35e84035dd 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hans.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hans.xlf @@ -1,4 +1,4 @@ - +
@@ -191,6 +191,11 @@ 你使用的是旧版 Microsoft.NET.Test.Sdk。请迁移到 15.3.0 及更高版本。 + + Failed to connect datacollector. + Failed to connect datacollector. + + \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hant.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hant.xlf index afebc9e83d..34aa510887 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hant.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hant.xlf @@ -1,4 +1,4 @@ - +
@@ -191,6 +191,11 @@ 您正使用較舊版的 Microsoft.NET.Test.Sdk。請移到等於或大於 15.3.0 的版本。 + + Failed to connect datacollector. + Failed to connect datacollector. + + \ No newline at end of file diff --git a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/ProxyDataCollectionManagerTests.cs b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/ProxyDataCollectionManagerTests.cs index fd9644cf64..e7f488c0c3 100644 --- a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/ProxyDataCollectionManagerTests.cs +++ b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/ProxyDataCollectionManagerTests.cs @@ -54,6 +54,37 @@ public void InitializeShouldInitializeCommunication() this.mockDataCollectionRequestSender.Verify(x => x.WaitForRequestHandlerConnection(ProxyDataCollectionManager.DataCollectorConnectionTimeout), Times.Once); } + [TestMethod] + public void InitializeShouldThrowExceptionIfConnectionTimeouts() + { + this.mockDataCollectionRequestSender.Setup( x => x.WaitForRequestHandlerConnection(ProxyDataCollectionManager.DataCollectorConnectionTimeout)).Returns(false); + + Assert.ThrowsException(() => this.proxyDataCollectionManager.Initialize()); + } + + [TestMethod] + public void InitializeShouldSetTimeoutBasedOnTimeoutEnvironmentVarible() + { + var timeout = 10; + Environment.SetEnvironmentVariable(ProxyDataCollectionManager.TimeoutEnvironmentVaribleName, timeout.ToString()); + + this.proxyDataCollectionManager.Initialize(); + Environment.SetEnvironmentVariable(ProxyDataCollectionManager.TimeoutEnvironmentVaribleName, string.Empty); + + this.mockDataCollectionRequestSender.Verify(x => x.WaitForRequestHandlerConnection(timeout * 1000), Times.Once); + } + + [TestMethod] + public void InitializeShouldSetTimeoutBasedOnDebugEnvironmentVaribleName() + { + Environment.SetEnvironmentVariable(ProxyDataCollectionManager.DebugEnvironmentVaribleName, "1"); + + this.proxyDataCollectionManager.Initialize(); + Environment.SetEnvironmentVariable(ProxyDataCollectionManager.DebugEnvironmentVaribleName, string.Empty); + + this.mockDataCollectionRequestSender.Verify(x => x.WaitForRequestHandlerConnection(ProxyDataCollectionManager.DataCollectorConnectionTimeout * 5), Times.Once); + } + [TestMethod] public void InitializeShouldPassDiagArgumentsIfDiagIsEnabled() { From 56a25cfea9ae0a604d7818ae85fecea8a3672bb5 Mon Sep 17 00:00:00 2001 From: samadala Date: Thu, 4 Jan 2018 21:58:33 +0530 Subject: [PATCH 6/8] Fix acceptance test --- .../DataCollection/TestPlatformDataCollectionLogger.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.TestPlatform.Common/DataCollection/TestPlatformDataCollectionLogger.cs b/src/Microsoft.TestPlatform.Common/DataCollection/TestPlatformDataCollectionLogger.cs index 9b63ae4a10..c86d9ed87c 100644 --- a/src/Microsoft.TestPlatform.Common/DataCollection/TestPlatformDataCollectionLogger.cs +++ b/src/Microsoft.TestPlatform.Common/DataCollection/TestPlatformDataCollectionLogger.cs @@ -95,7 +95,7 @@ public override void LogError(DataCollectionContext context, string text, Except CultureInfo.CurrentCulture, Resources.Resources.ReportDataCollectorException, exception.GetType(), - exception, + exception.Message, text); this.SendTextMessage(context, message, TestMessageLevel.Error); } From 1980aa0e08e0f55f6ce04034af3607e5fb4c6adb Mon Sep 17 00:00:00 2001 From: samadala Date: Fri, 5 Jan 2018 10:31:13 +0530 Subject: [PATCH 7/8] Fix unit tests --- .../Client/ProxyExecutionManagerWithDataCollectionTests.cs | 1 + .../DataCollection/ProxyDataCollectionManagerTests.cs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Client/ProxyExecutionManagerWithDataCollectionTests.cs b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Client/ProxyExecutionManagerWithDataCollectionTests.cs index 18c14659b0..7b2630b412 100644 --- a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Client/ProxyExecutionManagerWithDataCollectionTests.cs +++ b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Client/ProxyExecutionManagerWithDataCollectionTests.cs @@ -100,6 +100,7 @@ public void InitializeShouldSaveExceptionMessagesIfThrownByDataCollectionProcess { var mockRequestSender = new Mock(); mockRequestSender.Setup(x => x.SendBeforeTestRunStartAndGetResult(It.IsAny(), It.IsAny())).Throws(new Exception("MyException")); + mockRequestSender.Setup(x => x.WaitForRequestHandlerConnection(ProxyDataCollectionManager.DataCollectorConnectionTimeout)).Returns(true); var mockDataCollectionLauncher = new Mock(); var proxyDataCollectonManager = new ProxyDataCollectionManager(this.mockRequestData.Object, string.Empty, mockRequestSender.Object, this.mockProcessHelper.Object, mockDataCollectionLauncher.Object); diff --git a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/ProxyDataCollectionManagerTests.cs b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/ProxyDataCollectionManagerTests.cs index e7f488c0c3..89b08ebbbd 100644 --- a/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/ProxyDataCollectionManagerTests.cs +++ b/test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/DataCollection/ProxyDataCollectionManagerTests.cs @@ -48,6 +48,7 @@ public void Initialize() [TestMethod] public void InitializeShouldInitializeCommunication() { + this.mockDataCollectionRequestSender.Setup(x => x.WaitForRequestHandlerConnection(ProxyDataCollectionManager.DataCollectorConnectionTimeout)).Returns(true); this.proxyDataCollectionManager.Initialize(); this.mockDataCollectionLauncher.Verify(x => x.LaunchDataCollector(It.IsAny>(), It.IsAny>()), Times.Once); @@ -65,8 +66,10 @@ public void InitializeShouldThrowExceptionIfConnectionTimeouts() [TestMethod] public void InitializeShouldSetTimeoutBasedOnTimeoutEnvironmentVarible() { + var timeout = 10; Environment.SetEnvironmentVariable(ProxyDataCollectionManager.TimeoutEnvironmentVaribleName, timeout.ToString()); + this.mockDataCollectionRequestSender.Setup(x => x.WaitForRequestHandlerConnection(timeout * 1000)).Returns(true); this.proxyDataCollectionManager.Initialize(); Environment.SetEnvironmentVariable(ProxyDataCollectionManager.TimeoutEnvironmentVaribleName, string.Empty); @@ -78,6 +81,7 @@ public void InitializeShouldSetTimeoutBasedOnTimeoutEnvironmentVarible() public void InitializeShouldSetTimeoutBasedOnDebugEnvironmentVaribleName() { Environment.SetEnvironmentVariable(ProxyDataCollectionManager.DebugEnvironmentVaribleName, "1"); + this.mockDataCollectionRequestSender.Setup(x => x.WaitForRequestHandlerConnection(ProxyDataCollectionManager.DataCollectorConnectionTimeout * 5)).Returns(true); this.proxyDataCollectionManager.Initialize(); Environment.SetEnvironmentVariable(ProxyDataCollectionManager.DebugEnvironmentVaribleName, string.Empty); @@ -101,6 +105,7 @@ public void InitializeShouldPassDiagArgumentsIfDiagIsEnabled() try { EqtTrace.InitializeVerboseTrace("mylog.txt"); + this.mockDataCollectionRequestSender.Setup(x => x.WaitForRequestHandlerConnection(ProxyDataCollectionManager.DataCollectorConnectionTimeout)).Returns(true); this.proxyDataCollectionManager.Initialize(); From dcd161c17e14a75306abc00c94f1bf975c658763 Mon Sep 17 00:00:00 2001 From: samadala Date: Mon, 8 Jan 2018 11:48:11 +0530 Subject: [PATCH 8/8] Address PR comments --- .../TestRequestSender.cs | 10 ++-------- .../Resources/Resources.Designer.cs | 2 +- .../Resources/Resources.resx | 2 +- .../Resources/xlf/Resources.cs.xlf | 2 +- .../Resources/xlf/Resources.de.xlf | 2 +- .../Resources/xlf/Resources.es.xlf | 2 +- .../Resources/xlf/Resources.fr.xlf | 2 +- .../Resources/xlf/Resources.it.xlf | 2 +- .../Resources/xlf/Resources.ja.xlf | 2 +- .../Resources/xlf/Resources.ko.xlf | 2 +- .../Resources/xlf/Resources.pl.xlf | 2 +- .../Resources/xlf/Resources.pt-BR.xlf | 2 +- .../Resources/xlf/Resources.ru.xlf | 2 +- .../Resources/xlf/Resources.tr.xlf | 2 +- .../Resources/xlf/Resources.xlf | 2 +- .../Resources/xlf/Resources.zh-Hans.xlf | 2 +- .../Resources/xlf/Resources.zh-Hant.xlf | 2 +- 17 files changed, 18 insertions(+), 24 deletions(-) diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/TestRequestSender.cs b/src/Microsoft.TestPlatform.CommunicationUtilities/TestRequestSender.cs index db50f31242..5f03650719 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/TestRequestSender.cs +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/TestRequestSender.cs @@ -165,19 +165,13 @@ public void CheckVersionWithTestHost() if (message.MessageType == MessageType.VersionCheck) { this.protocolVersion = this.dataSerializer.DeserializePayload(message); - - EqtTrace.Info(@"TestRequestSender: VersionCheck Succeeded, NegotiatedVersion = {0}", this.protocolVersion); } // TRH can also send TestMessage if tracing is enabled, so log it at runner end else if (message.MessageType == MessageType.TestMessage) { - // Only Deserialize if Tracing is enabled - if (EqtTrace.IsInfoEnabled) - { - var testMessagePayload = this.dataSerializer.DeserializePayload(message); - EqtTrace.Info("TestRequestSender.CheckVersionWithTestHost: " + testMessagePayload.Message); - } + // Ignore test messages. Currently we don't have handler(which sends messages to client/console.) here. + // Above we are logging it to EqtTrace. } else if (message.MessageType == MessageType.ProtocolError) { diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/Resources.Designer.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/Resources.Designer.cs index bba27dfc3c..9f220667af 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/Resources.Designer.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/Resources.Designer.cs @@ -134,7 +134,7 @@ internal static string ExecutionThreadApartmentStateNotSupportedForFramework { } /// - /// Looks up a localized string similar to Failed to connect datacollector.. + /// Looks up a localized string similar to Failed to connect to datacollector process.. /// internal static string FailedToConnectDataCollector { get { diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/Resources.resx b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/Resources.resx index 73f35709c6..9c5444edee 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/Resources.resx +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/Resources.resx @@ -190,6 +190,6 @@ You are using an older version of Microsoft.NET.Test.Sdk. Kindly move to a version equal or greater than 15.3.0. - Failed to connect datacollector. + Failed to connect to datacollector process. \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.cs.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.cs.xlf index 581823b5e1..d1875ce2e1 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.cs.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.cs.xlf @@ -192,7 +192,7 @@ - Failed to connect datacollector. + Failed to connect to datacollector process. Failed to connect datacollector. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.de.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.de.xlf index 28fe3dadbf..d2a9e1ce6a 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.de.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.de.xlf @@ -192,7 +192,7 @@ - Failed to connect datacollector. + Failed to connect to datacollector process. Failed to connect datacollector. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.es.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.es.xlf index 2c5d410659..ad583b5fe7 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.es.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.es.xlf @@ -192,7 +192,7 @@ - Failed to connect datacollector. + Failed to connect to datacollector process. Failed to connect datacollector. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.fr.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.fr.xlf index cd12be97a6..553f8f2c53 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.fr.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.fr.xlf @@ -192,7 +192,7 @@ - Failed to connect datacollector. + Failed to connect to datacollector process. Failed to connect datacollector. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.it.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.it.xlf index 910c9d6f49..33a0c8611d 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.it.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.it.xlf @@ -192,7 +192,7 @@ - Failed to connect datacollector. + Failed to connect to datacollector process. Failed to connect datacollector. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ja.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ja.xlf index 294e71d28d..565e3a66f9 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ja.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ja.xlf @@ -192,7 +192,7 @@ - Failed to connect datacollector. + Failed to connect to datacollector process. Failed to connect datacollector. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ko.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ko.xlf index e8faf84c72..a45d854dd6 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ko.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ko.xlf @@ -192,7 +192,7 @@ - Failed to connect datacollector. + Failed to connect to datacollector process. Failed to connect datacollector. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pl.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pl.xlf index aa90f1adf0..ae48a217ca 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pl.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pl.xlf @@ -192,7 +192,7 @@ - Failed to connect datacollector. + Failed to connect to datacollector process. Failed to connect datacollector. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pt-BR.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pt-BR.xlf index 5210e6d77e..3f5d359d98 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pt-BR.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.pt-BR.xlf @@ -192,7 +192,7 @@ - Failed to connect datacollector. + Failed to connect to datacollector process. Failed to connect datacollector. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ru.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ru.xlf index 135ac1430b..aa961d93b0 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ru.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.ru.xlf @@ -192,7 +192,7 @@ - Failed to connect datacollector. + Failed to connect to datacollector process. Failed to connect datacollector. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.tr.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.tr.xlf index 78f684d3fe..341ebaffbc 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.tr.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.tr.xlf @@ -192,7 +192,7 @@ - Failed to connect datacollector. + Failed to connect to datacollector process. Failed to connect datacollector. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.xlf index 381ab9e462..ff42d08ab4 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.xlf @@ -103,7 +103,7 @@ - Failed to connect datacollector. + Failed to connect to datacollector process. Failed to connect datacollector. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hans.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hans.xlf index 35e84035dd..6869392d9b 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hans.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hans.xlf @@ -192,7 +192,7 @@ - Failed to connect datacollector. + Failed to connect to datacollector process. Failed to connect datacollector. diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hant.xlf b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hant.xlf index 34aa510887..e1c1947cb4 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hant.xlf +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Resources/xlf/Resources.zh-Hant.xlf @@ -192,7 +192,7 @@ - Failed to connect datacollector. + Failed to connect to datacollector process. Failed to connect datacollector.