From 39f3f84f1da86402ac39dbf1464537dc7a48e533 Mon Sep 17 00:00:00 2001 From: Jakub Chocholowicz Date: Thu, 11 Jun 2020 10:20:33 +0200 Subject: [PATCH] Review comments #1 --- .../DesignMode/DesignModeClient.cs | 27 +++++------ .../MultiTestRunFinalizationEventsHandler.cs} | 40 ++++++++++------ .../RequestHelper/ITestRequestManager.cs | 12 ++--- ...cs => IMultiTestRunFinalizationManager.cs} | 10 ++-- .../JsonDataSerializer.cs | 2 +- .../Messages/MessageType.cs | 12 ++--- ...ultiTestRunFinalizationCompletePayload.cs} | 6 +-- .../Interfaces/ITestPlatformEventSource.cs | 32 ++++++------- .../Tracing/TestPlatformEventSource.cs | 48 +++++++++---------- .../TestPlatformInstrumentationEvents.cs | 16 +++---- .../Adapter/FrameworkHandle.cs | 2 +- .../DataCollectorAttachmentsHandler.cs | 46 ++++++++++++++++++ ...TestRunsDataCollectorAttachmentsHandler.cs | 43 ----------------- .../ParallelDataCollectionEventsHandler.cs | 4 +- .../MultiTestRunFinalizationManager.cs} | 26 +++++----- .../Adapter/Interfaces/IFrameworkHandle.cs | 2 +- ...IMultiTestRunFinalizationEventsHandler.cs} | 8 ++-- ....cs => MultiTestRunFinalizationPayload.cs} | 4 +- .../ITranslationLayerRequestSender.cs | 8 ++-- .../Interfaces/IVsTestConsoleWrapper2.cs | 8 ++-- .../Resources/Resources.Designer.cs | 4 +- .../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 +- .../VsTestConsoleRequestSender.cs | 32 ++++++------- .../VsTestConsoleWrapper.cs | 8 ++-- .../TestPlatformHelpers/TestRequestManager.cs | 32 ++++++------- ...> MultiTestRunFinalizationEventHandler.cs} | 6 +-- ...sTests.cs => FinalizeMultiTestRunTests.cs} | 16 +++---- ...llyQualifiedTestsArgumentProcessorTests.cs | 4 +- .../ListTestsArgumentProcessorTests.cs | 4 +- .../RunSpecificTestsArgumentProcessorTests.cs | 4 +- .../RunTestsArgumentProcessorTests.cs | 4 +- .../TestRequestManagerTests.cs | 4 +- 46 files changed, 257 insertions(+), 247 deletions(-) rename src/Microsoft.TestPlatform.Client/{MultiTestRunsFinalization/MultiTestRunsFinalizationEventsHandler.cs => MultiTestRunFinalization/MultiTestRunFinalizationEventsHandler.cs} (57%) rename src/Microsoft.TestPlatform.Common/Interfaces/Engine/{IMultiTestRunsFinalizationManager.cs => IMultiTestRunFinalizationManager.cs} (63%) rename src/Microsoft.TestPlatform.CommunicationUtilities/Messages/{MultiTestRunsFinalizationCompletePayload.cs => MultiTestRunFinalizationCompletePayload.cs} (73%) create mode 100644 src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/DataCollectorAttachmentsHandler.cs delete mode 100644 src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/MultiTestRunsDataCollectorAttachmentsHandler.cs rename src/Microsoft.TestPlatform.CrossPlatEngine/{MultiTestRunsFinalization/MultiTestRunsFinalizationManager.cs => MultiTestRunFinalization/MultiTestRunFinalizationManager.cs} (63%) rename src/Microsoft.TestPlatform.ObjectModel/Client/Interfaces/{IMultiTestRunsFinalizationEventsHandler.cs => IMultiTestRunFinalizationEventsHandler.cs} (55%) rename src/Microsoft.TestPlatform.ObjectModel/Client/Payloads/{MultiTestRunsFinalizationPayload.cs => MultiTestRunFinalizationPayload.cs} (75%) rename test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/EventHandler/{MultiTestRunsFinalizationEventHandler.cs => MultiTestRunFinalizationEventHandler.cs} (90%) rename test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/{FinalizeMultiTestRunsTests.cs => FinalizeMultiTestRunTests.cs} (94%) diff --git a/src/Microsoft.TestPlatform.Client/DesignMode/DesignModeClient.cs b/src/Microsoft.TestPlatform.Client/DesignMode/DesignModeClient.cs index 64e03580af..f83ff7d0bc 100644 --- a/src/Microsoft.TestPlatform.Client/DesignMode/DesignModeClient.cs +++ b/src/Microsoft.TestPlatform.Client/DesignMode/DesignModeClient.cs @@ -9,7 +9,7 @@ namespace Microsoft.VisualStudio.TestPlatform.Client.DesignMode using System.Net; using System.Threading; using System.Threading.Tasks; - using Microsoft.VisualStudio.TestPlatform.Client.MultiTestRunsFinalization; + using Microsoft.VisualStudio.TestPlatform.Client.MultiTestRunFinalization; using Microsoft.VisualStudio.TestPlatform.Client.RequestHelper; using Microsoft.VisualStudio.TestPlatform.Common.Logging; using Microsoft.VisualStudio.TestPlatform.Common.Utilities; @@ -17,13 +17,11 @@ namespace Microsoft.VisualStudio.TestPlatform.Client.DesignMode using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.Interfaces; using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.ObjectModel; using Microsoft.VisualStudio.TestPlatform.CoreUtilities.Helpers; - using Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.DataCollection; using Microsoft.VisualStudio.TestPlatform.ObjectModel; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; using Microsoft.VisualStudio.TestPlatform.PlatformAbstractions; using Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.Interfaces; - using Microsoft.VisualStudio.TestPlatform.Utilities; using CommunicationUtilitiesResources = Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.Resources.Resources; using CoreUtilitiesConstants = Microsoft.VisualStudio.TestPlatform.CoreUtilities.Constants; using ObjectModelConstants = Microsoft.VisualStudio.TestPlatform.ObjectModel.Constants; @@ -201,11 +199,11 @@ private void ProcessRequests(ITestRequestManager testRequestManager) break; } - case MessageType.MultiTestRunsFinalizationStart: + case MessageType.MultiTestRunFinalizationStart: { - var multiTestRunsFinalizationPayload = - this.communicationManager.DeserializePayload(message); - this.StartMultiTestRunsFinalization(multiTestRunsFinalizationPayload, testRequestManager); + var multiTestRunFinalizationPayload = + this.communicationManager.DeserializePayload(message); + this.StartMultiTestRunFinalization(multiTestRunFinalizationPayload, testRequestManager); break; } @@ -227,9 +225,9 @@ private void ProcessRequests(ITestRequestManager testRequestManager) break; } - case MessageType.MultiTestRunsFinalizationCancel: + case MessageType.MultiTestRunFinalizationCancel: { - testRequestManager.CancelMultiTestRunsFinalization(); + testRequestManager.CancelMultiTestRunFinalization(); break; } @@ -474,30 +472,29 @@ private void StartDiscovery(DiscoveryRequestPayload discoveryRequestPayload, ITe }); } - private void StartMultiTestRunsFinalization(MultiTestRunsFinalizationPayload finalizationPayload, ITestRequestManager testRequestManager) + private void StartMultiTestRunFinalization(MultiTestRunFinalizationPayload finalizationPayload, ITestRequestManager testRequestManager) { Task.Run( delegate { try { - testRequestManager.ResetOptions(); - testRequestManager.FinalizeMultiTestRuns(finalizationPayload, new MultiTestRunsFinalizationEventsHandler(this.communicationManager)); + testRequestManager.FinalizeMultiTestRun(finalizationPayload, new MultiTestRunFinalizationEventsHandler(this.communicationManager)); } catch (Exception ex) { - EqtTrace.Error("DesignModeClient: Exception in StartMultiTestRunsFinalization: " + ex); + EqtTrace.Error("DesignModeClient: Exception in StartMultiTestRunFinalization: " + ex); var testMessagePayload = new TestMessagePayload { MessageLevel = TestMessageLevel.Error, Message = ex.ToString() }; this.communicationManager.SendMessage(MessageType.TestMessage, testMessagePayload); - var payload = new MultiTestRunsFinalizationCompletePayload() + var payload = new MultiTestRunFinalizationCompletePayload() { Attachments = null }; // Send run complete to translation layer - this.communicationManager.SendMessage(MessageType.MultiTestRunsFinalizationComplete, payload); + this.communicationManager.SendMessage(MessageType.MultiTestRunFinalizationComplete, payload); } }); } diff --git a/src/Microsoft.TestPlatform.Client/MultiTestRunsFinalization/MultiTestRunsFinalizationEventsHandler.cs b/src/Microsoft.TestPlatform.Client/MultiTestRunFinalization/MultiTestRunFinalizationEventsHandler.cs similarity index 57% rename from src/Microsoft.TestPlatform.Client/MultiTestRunsFinalization/MultiTestRunsFinalizationEventsHandler.cs rename to src/Microsoft.TestPlatform.Client/MultiTestRunFinalization/MultiTestRunFinalizationEventsHandler.cs index e9111ad903..e2c59074db 100644 --- a/src/Microsoft.TestPlatform.Client/MultiTestRunsFinalization/MultiTestRunsFinalizationEventsHandler.cs +++ b/src/Microsoft.TestPlatform.Client/MultiTestRunFinalization/MultiTestRunFinalizationEventsHandler.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace Microsoft.VisualStudio.TestPlatform.Client.MultiTestRunsFinalization +namespace Microsoft.VisualStudio.TestPlatform.Client.MultiTestRunFinalization { using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.Interfaces; using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.ObjectModel; @@ -13,15 +13,17 @@ namespace Microsoft.VisualStudio.TestPlatform.Client.MultiTestRunsFinalization /// /// The multi test finalization event handler. /// - public class MultiTestRunsFinalizationEventsHandler : IMultiTestRunsFinalizationEventsHandler + public class MultiTestRunFinalizationEventsHandler : IMultiTestRunFinalizationEventsHandler { - private ICommunicationManager communicationManager; + private readonly ICommunicationManager communicationManager; + private bool finalizationCompleteSent; + private readonly object syncObject = new object(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The Request Handler. - public MultiTestRunsFinalizationEventsHandler(ICommunicationManager communicationManager) + public MultiTestRunFinalizationEventsHandler(ICommunicationManager communicationManager) { this.communicationManager = communicationManager; } @@ -37,20 +39,28 @@ public void HandleLogMessage(TestMessageLevel level, string message) this.communicationManager.SendMessage(MessageType.TestMessage, testMessagePayload); } - public void HandleMultiTestRunsFinalizationComplete(ICollection attachments) + public void HandleMultiTestRunFinalizationComplete(ICollection attachments) { - if (EqtTrace.IsInfoEnabled) + lock(this.syncObject) { - EqtTrace.Info("Multi test runs finalization completed."); - } + if(!finalizationCompleteSent) + { + if (EqtTrace.IsInfoEnabled) + { + EqtTrace.Info("Multi test run finalization completed."); + } - var payload = new MultiTestRunsFinalizationCompletePayload() - { - Attachments = attachments - }; + var payload = new MultiTestRunFinalizationCompletePayload() + { + Attachments = attachments + }; - // Send run complete to translation layer - this.communicationManager.SendMessage(MessageType.MultiTestRunsFinalizationComplete, payload); + // Send run complete to translation layer + this.communicationManager.SendMessage(MessageType.MultiTestRunFinalizationComplete, payload); + + finalizationCompleteSent = true; + } + } } public void HandleRawMessage(string rawMessage) diff --git a/src/Microsoft.TestPlatform.Client/RequestHelper/ITestRequestManager.cs b/src/Microsoft.TestPlatform.Client/RequestHelper/ITestRequestManager.cs index 813f9f416e..380484ab7f 100644 --- a/src/Microsoft.TestPlatform.Client/RequestHelper/ITestRequestManager.cs +++ b/src/Microsoft.TestPlatform.Client/RequestHelper/ITestRequestManager.cs @@ -45,11 +45,11 @@ public interface ITestRequestManager : IDisposable void RunTests(TestRunRequestPayload testRunRequestPayLoad, ITestHostLauncher customTestHostLauncher, ITestRunEventsRegistrar testRunEventsRegistrar, ProtocolConfig protocolConfig); /// - /// Finalize multi test runs + /// Finalize multi test run /// - /// Multi test runs finalization payload - /// Multi test runs finalization events handler - void FinalizeMultiTestRuns(MultiTestRunsFinalizationPayload multiTestRunsFinalizationPayload, IMultiTestRunsFinalizationEventsHandler multiTestRunsFinalizationEventsHandler); + /// Multi test run finalization payload + /// Multi test run finalization events handler + void FinalizeMultiTestRun(MultiTestRunFinalizationPayload multiTestRunFinalizationPayload, IMultiTestRunFinalizationEventsHandler multiTestRunFinalizationEventsHandler); /// /// Cancel the current TestRun request @@ -67,8 +67,8 @@ public interface ITestRequestManager : IDisposable void CancelDiscovery(); /// - /// Cancels the current multi test runs finalization request + /// Cancels the current multi test run finalization request /// - void CancelMultiTestRunsFinalization(); + void CancelMultiTestRunFinalization(); } } diff --git a/src/Microsoft.TestPlatform.Common/Interfaces/Engine/IMultiTestRunsFinalizationManager.cs b/src/Microsoft.TestPlatform.Common/Interfaces/Engine/IMultiTestRunFinalizationManager.cs similarity index 63% rename from src/Microsoft.TestPlatform.Common/Interfaces/Engine/IMultiTestRunsFinalizationManager.cs rename to src/Microsoft.TestPlatform.Common/Interfaces/Engine/IMultiTestRunFinalizationManager.cs index 64d14e8f56..892c2336bb 100644 --- a/src/Microsoft.TestPlatform.Common/Interfaces/Engine/IMultiTestRunsFinalizationManager.cs +++ b/src/Microsoft.TestPlatform.Common/Interfaces/Engine/IMultiTestRunFinalizationManager.cs @@ -9,16 +9,16 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Engine { /// - /// Orchestrates multi test runs finalization operations. + /// Orchestrates multi test run finalization operations. /// - public interface IMultiTestRunsFinalizationManager + public interface IMultiTestRunFinalizationManager { /// - /// Finalizes multi test runs + /// Finalizes multi test run /// /// Attachments - /// EventHandler for handling multi test runs finalization events from Engine + /// EventHandler for handling multi test run finalization events from Engine /// Cancellation token - Task FinalizeMultiTestRunsAsync(ICollection attachments, IMultiTestRunsFinalizationEventsHandler eventHandler, CancellationToken cancellationToken); + Task FinalizeMultiTestRunAsync(ICollection attachments, IMultiTestRunFinalizationEventsHandler eventHandler, CancellationToken cancellationToken); } } diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/JsonDataSerializer.cs b/src/Microsoft.TestPlatform.CommunicationUtilities/JsonDataSerializer.cs index d0aa538ebe..4923e98e4a 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/JsonDataSerializer.cs +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/JsonDataSerializer.cs @@ -47,7 +47,7 @@ private JsonDataSerializer() // MemoryTraceWriter can help diagnose serialization issues. Enable it for // debug builds only. // Note that MemoryTraceWriter is not thread safe, please don't use it in parallel - // test runs. See https://github.com/JamesNK/Newtonsoft.Json/issues/1279 + // test run. See https://github.com/JamesNK/Newtonsoft.Json/issues/1279 payloadSerializer.TraceWriter = new MemoryTraceWriter(); payloadSerializer2.TraceWriter = new MemoryTraceWriter(); #endif diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/Messages/MessageType.cs b/src/Microsoft.TestPlatform.CommunicationUtilities/Messages/MessageType.cs index 041617694f..bb23393f03 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/Messages/MessageType.cs +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/Messages/MessageType.cs @@ -124,19 +124,19 @@ public static class MessageType public const string CustomTestHostLaunchCallback = "TestExecution.CustomTestHostLaunchCallback"; /// - /// Multi test runs finalization + /// Multi test run finalization /// - public const string MultiTestRunsFinalizationStart = "MultiTestRunsFinalization.Start"; + public const string MultiTestRunFinalizationStart = "MultiTestRunFinalization.Start"; /// - /// Multi test runs finalization callback + /// Multi test run finalization callback /// - public const string MultiTestRunsFinalizationComplete = "MultiTestRunsFinalization.Complete"; + public const string MultiTestRunFinalizationComplete = "MultiTestRunFinalization.Complete"; /// - /// Cancel multi test runs finalization + /// Cancel multi test run finalization /// - public const string MultiTestRunsFinalizationCancel = "MultiTestRunsFinalization.Cancel"; + public const string MultiTestRunFinalizationCancel = "MultiTestRunFinalization.Cancel"; /// /// Extensions Initialization diff --git a/src/Microsoft.TestPlatform.CommunicationUtilities/Messages/MultiTestRunsFinalizationCompletePayload.cs b/src/Microsoft.TestPlatform.CommunicationUtilities/Messages/MultiTestRunFinalizationCompletePayload.cs similarity index 73% rename from src/Microsoft.TestPlatform.CommunicationUtilities/Messages/MultiTestRunsFinalizationCompletePayload.cs rename to src/Microsoft.TestPlatform.CommunicationUtilities/Messages/MultiTestRunFinalizationCompletePayload.cs index 457f539d86..d20d55e61a 100644 --- a/src/Microsoft.TestPlatform.CommunicationUtilities/Messages/MultiTestRunsFinalizationCompletePayload.cs +++ b/src/Microsoft.TestPlatform.CommunicationUtilities/Messages/MultiTestRunFinalizationCompletePayload.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.ObjectModel @@ -8,9 +8,9 @@ namespace Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.ObjectModel using Microsoft.VisualStudio.TestPlatform.ObjectModel; /// - /// Multi test runs finalization complete payload. + /// Multi test run finalization complete payload. /// - public class MultiTestRunsFinalizationCompletePayload + public class MultiTestRunFinalizationCompletePayload { /// /// Gets or sets the attachments. diff --git a/src/Microsoft.TestPlatform.CoreUtilities/Tracing/Interfaces/ITestPlatformEventSource.cs b/src/Microsoft.TestPlatform.CoreUtilities/Tracing/Interfaces/ITestPlatformEventSource.cs index db84bd3bd6..41a0d7b7ce 100644 --- a/src/Microsoft.TestPlatform.CoreUtilities/Tracing/Interfaces/ITestPlatformEventSource.cs +++ b/src/Microsoft.TestPlatform.CoreUtilities/Tracing/Interfaces/ITestPlatformEventSource.cs @@ -184,52 +184,52 @@ public interface ITestPlatformEventSource void MetricsDisposeStop(); /// - /// The multi test runs finalization request start. + /// The multi test run finalization request start. /// - void MultiTestRunsFinalizationRequestStart(); + void MultiTestRunFinalizationRequestStart(); /// - /// The multi test runs finalization request stop. + /// The multi test run finalization request stop. /// - void MultiTestRunsFinalizationRequestStop(); + void MultiTestRunFinalizationRequestStop(); /// - /// The adapter multi test runs finalization start. + /// The adapter multi test run finalization start. /// /// /// The number of attachements. /// - void AdapterMultiTestRunsFinalizationStart(long numberOfAttachements); + void AdapterMultiTestRunFinalizationStart(long numberOfAttachements); /// - /// The adapter multi test runs finalization stop. + /// The adapter multi test run finalization stop. /// /// /// The number of attachements. /// - void AdapterMultiTestRunsFinalizationStop(long numberOfAttachements); + void AdapterMultiTestRunFinalizationStop(long numberOfAttachements); /// - /// The multi test runs finalization start. + /// The multi test run finalization start. /// - void MultiTestRunsFinalizationStart(); + void MultiTestRunFinalizationStart(); /// - /// The multi test runs finalization stop. + /// The multi test run finalization stop. /// /// /// The number of attachements. /// - void MultiTestRunsFinalizationStop(long numberOfAttachements); + void MultiTestRunFinalizationStop(long numberOfAttachements); /// - /// Mark the start of translation layer multi test runs finalization request. + /// Mark the start of translation layer multi test run finalization request. /// - void TranslationLayerMultiTestRunsFinalizationStart(); + void TranslationLayerMultiTestRunFinalizationStart(); /// - /// Mark the completion of translation layer multi test runs finalization request. + /// Mark the completion of translation layer multi test run finalization request. /// - void TranslationLayerMultiTestRunsFinalizationStop(); + void TranslationLayerMultiTestRunFinalizationStop(); } } diff --git a/src/Microsoft.TestPlatform.CoreUtilities/Tracing/TestPlatformEventSource.cs b/src/Microsoft.TestPlatform.CoreUtilities/Tracing/TestPlatformEventSource.cs index edf6846b19..7a615cf53e 100644 --- a/src/Microsoft.TestPlatform.CoreUtilities/Tracing/TestPlatformEventSource.cs +++ b/src/Microsoft.TestPlatform.CoreUtilities/Tracing/TestPlatformEventSource.cs @@ -239,59 +239,59 @@ public void MetricsDisposeStop() } /// - [Event(TestPlatformInstrumentationEvents.MultiTestRunsFinalizationRequestStartEventId)] - public void MultiTestRunsFinalizationRequestStart() + [Event(TestPlatformInstrumentationEvents.MultiTestRunFinalizationRequestStartEventId)] + public void MultiTestRunFinalizationRequestStart() { - this.WriteEvent(TestPlatformInstrumentationEvents.MultiTestRunsFinalizationRequestStartEventId); + this.WriteEvent(TestPlatformInstrumentationEvents.MultiTestRunFinalizationRequestStartEventId); } /// - [Event(TestPlatformInstrumentationEvents.MultiTestRunsFinalizationRequestStopEventId)] - public void MultiTestRunsFinalizationRequestStop() + [Event(TestPlatformInstrumentationEvents.MultiTestRunFinalizationRequestStopEventId)] + public void MultiTestRunFinalizationRequestStop() { - this.WriteEvent(TestPlatformInstrumentationEvents.MultiTestRunsFinalizationRequestStopEventId); + this.WriteEvent(TestPlatformInstrumentationEvents.MultiTestRunFinalizationRequestStopEventId); } /// - [Event(TestPlatformInstrumentationEvents.AdapterMultiTestRunsFinalizationStartEventId)] - public void AdapterMultiTestRunsFinalizationStart(long numberOfAttachements) + [Event(TestPlatformInstrumentationEvents.AdapterMultiTestRunFinalizationStartEventId)] + public void AdapterMultiTestRunFinalizationStart(long numberOfAttachements) { - this.WriteEvent(TestPlatformInstrumentationEvents.AdapterMultiTestRunsFinalizationStartEventId, numberOfAttachements); + this.WriteEvent(TestPlatformInstrumentationEvents.AdapterMultiTestRunFinalizationStartEventId, numberOfAttachements); } /// - [Event(TestPlatformInstrumentationEvents.AdapterMultiTestRunsFinalizationStopEventId)] - public void AdapterMultiTestRunsFinalizationStop(long numberOfAttachements) + [Event(TestPlatformInstrumentationEvents.AdapterMultiTestRunFinalizationStopEventId)] + public void AdapterMultiTestRunFinalizationStop(long numberOfAttachements) { - this.WriteEvent(TestPlatformInstrumentationEvents.AdapterMultiTestRunsFinalizationStopEventId, numberOfAttachements); + this.WriteEvent(TestPlatformInstrumentationEvents.AdapterMultiTestRunFinalizationStopEventId, numberOfAttachements); } /// - [Event(TestPlatformInstrumentationEvents.MultiTestRunsFinalizationStartEventId)] - public void MultiTestRunsFinalizationStart() + [Event(TestPlatformInstrumentationEvents.MultiTestRunFinalizationStartEventId)] + public void MultiTestRunFinalizationStart() { - this.WriteEvent(TestPlatformInstrumentationEvents.MultiTestRunsFinalizationStartEventId); + this.WriteEvent(TestPlatformInstrumentationEvents.MultiTestRunFinalizationStartEventId); } /// - [Event(TestPlatformInstrumentationEvents.MultiTestRunsFinalizationStopEventId)] - public void MultiTestRunsFinalizationStop(long numberOfAttachements) + [Event(TestPlatformInstrumentationEvents.MultiTestRunFinalizationStopEventId)] + public void MultiTestRunFinalizationStop(long numberOfAttachements) { - this.WriteEvent(TestPlatformInstrumentationEvents.MultiTestRunsFinalizationStopEventId, numberOfAttachements); + this.WriteEvent(TestPlatformInstrumentationEvents.MultiTestRunFinalizationStopEventId, numberOfAttachements); } /// - [Event(TestPlatformInstrumentationEvents.TranslationLayerMultiTestRunsFinalizationStartEventId)] - public void TranslationLayerMultiTestRunsFinalizationStart() + [Event(TestPlatformInstrumentationEvents.TranslationLayerMultiTestRunFinalizationStartEventId)] + public void TranslationLayerMultiTestRunFinalizationStart() { - this.WriteEvent(TestPlatformInstrumentationEvents.TranslationLayerMultiTestRunsFinalizationStartEventId); + this.WriteEvent(TestPlatformInstrumentationEvents.TranslationLayerMultiTestRunFinalizationStartEventId); } /// - [Event(TestPlatformInstrumentationEvents.TranslationLayerMultiTestRunsFinalizationStopEventId)] - public void TranslationLayerMultiTestRunsFinalizationStop() + [Event(TestPlatformInstrumentationEvents.TranslationLayerMultiTestRunFinalizationStopEventId)] + public void TranslationLayerMultiTestRunFinalizationStop() { - this.WriteEvent(TestPlatformInstrumentationEvents.TranslationLayerMultiTestRunsFinalizationStopEventId); + this.WriteEvent(TestPlatformInstrumentationEvents.TranslationLayerMultiTestRunFinalizationStopEventId); } } } diff --git a/src/Microsoft.TestPlatform.CoreUtilities/Tracing/TestPlatformInstrumentationEvents.cs b/src/Microsoft.TestPlatform.CoreUtilities/Tracing/TestPlatformInstrumentationEvents.cs index 9931100f1c..498eb86b25 100644 --- a/src/Microsoft.TestPlatform.CoreUtilities/Tracing/TestPlatformInstrumentationEvents.cs +++ b/src/Microsoft.TestPlatform.CoreUtilities/Tracing/TestPlatformInstrumentationEvents.cs @@ -161,41 +161,41 @@ internal class TestPlatformInstrumentationEvents /// /// The session finalization start event id. /// - public const int MultiTestRunsFinalizationStartEventId = 0x40; + public const int MultiTestRunFinalizationStartEventId = 0x40; /// /// The session finalization stop event id. /// - public const int MultiTestRunsFinalizationStopEventId = 0x41; + public const int MultiTestRunFinalizationStopEventId = 0x41; /// /// The session finalization request start event id. /// - public const int MultiTestRunsFinalizationRequestStartEventId = 0x42; + public const int MultiTestRunFinalizationRequestStartEventId = 0x42; /// /// The session finalization request stop event id. /// - public const int MultiTestRunsFinalizationRequestStopEventId = 0x43; + public const int MultiTestRunFinalizationRequestStopEventId = 0x43; /// /// The adapter session finalization start event id. /// - public const int AdapterMultiTestRunsFinalizationStartEventId = 0x44; + public const int AdapterMultiTestRunFinalizationStartEventId = 0x44; /// /// The adapter session finalization stop event id. /// - public const int AdapterMultiTestRunsFinalizationStopEventId = 0x45; + public const int AdapterMultiTestRunFinalizationStopEventId = 0x45; /// /// Events fired on session finalization start of translation layer. /// - public const int TranslationLayerMultiTestRunsFinalizationStartEventId = 0x46; + public const int TranslationLayerMultiTestRunFinalizationStartEventId = 0x46; /// /// Events fired on session finalization complete in translation layer. /// - public const int TranslationLayerMultiTestRunsFinalizationStopEventId = 0x47; + public const int TranslationLayerMultiTestRunFinalizationStopEventId = 0x47; } } \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Adapter/FrameworkHandle.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/Adapter/FrameworkHandle.cs index ca8ba14780..fb5fb90129 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/Adapter/FrameworkHandle.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/Adapter/FrameworkHandle.cs @@ -59,7 +59,7 @@ public FrameworkHandle(ITestCaseEventsHandler testCaseEventsHandler, ITestRunCac /// - /// Give a hint to the execution framework to enable the shutdown of execution process after the test run is complete. This should be used only in out of process test runs when IRunContext.KeepAlive is true + /// Give a hint to the execution framework to enable the shutdown of execution process after the test run is complete. This should be used only in out of process test run when IRunContext.KeepAlive is true /// and should be used only when absolutely required as using it degrades the performance of the subsequent run. /// It throws InvalidOperationException when it is attempted to be enabled when keepAlive is false. /// diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/DataCollectorAttachmentsHandler.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/DataCollectorAttachmentsHandler.cs new file mode 100644 index 0000000000..40037744b1 --- /dev/null +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/DataCollectorAttachmentsHandler.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using Microsoft.VisualStudio.TestPlatform.ObjectModel; +using Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Threading; + +namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.DataCollection +{ + public class DataCollectorAttachmentsHandler + { + private readonly IDataCollectorAttachments[] dataCollectorAttachmentsHandlers; + + public DataCollectorAttachmentsHandler(params IDataCollectorAttachments[] dataCollectorAttachmentsHandlers) + { + this.dataCollectorAttachmentsHandlers = dataCollectorAttachmentsHandlers; + } + + public void HandleAttachements(ICollection attachments, CancellationToken cancellationToken) + { + foreach(var dataCollectorAttachmentsHandler in dataCollectorAttachmentsHandlers) + { + Uri attachementUri = dataCollectorAttachmentsHandler.GetExtensionUri(); + if (attachementUri != null) + { + var coverageAttachments = attachments.Where(dataCollectionAttachment => attachementUri.Equals(dataCollectionAttachment.Uri)).ToArray(); + + foreach (var coverageAttachment in coverageAttachments) + { + attachments.Remove(coverageAttachment); + } + + ICollection mergedAttachments = dataCollectorAttachmentsHandler.HandleDataCollectionAttachmentSets(new Collection(coverageAttachments), cancellationToken); + foreach (var attachment in mergedAttachments) + { + attachments.Add(attachment); + } + } + } + } + } +} diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/MultiTestRunsDataCollectorAttachmentsHandler.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/MultiTestRunsDataCollectorAttachmentsHandler.cs deleted file mode 100644 index b83b6d327a..0000000000 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/MultiTestRunsDataCollectorAttachmentsHandler.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using Microsoft.VisualStudio.TestPlatform.ObjectModel; -using Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection; -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; - -namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.DataCollection -{ - public class MultiTestRunsDataCollectorAttachmentsHandler - { - private readonly IDataCollectorAttachments dataCollectorAttachmentsHandler; - - public MultiTestRunsDataCollectorAttachmentsHandler(IDataCollectorAttachments dataCollectorAttachmentsHandler) - { - this.dataCollectorAttachmentsHandler = dataCollectorAttachmentsHandler; - } - - public void HandleAttachements(ICollection attachments, CancellationToken cancellationToken) - { - Uri attachementUri = dataCollectorAttachmentsHandler.GetExtensionUri(); - if (attachementUri != null) - { - var coverageAttachments = attachments.Where(dataCollectionAttachment => attachementUri.Equals(dataCollectionAttachment.Uri)).ToArray(); - - foreach (var coverageAttachment in coverageAttachments) - { - attachments.Remove(coverageAttachment); - } - - ICollection mergedAttachments = dataCollectorAttachmentsHandler.HandleDataCollectionAttachmentSets(new Collection(coverageAttachments), cancellationToken); - foreach (var attachment in mergedAttachments) - { - attachments.Add(attachment); - } - } - } - } -} diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ParallelDataCollectionEventsHandler.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ParallelDataCollectionEventsHandler.cs index 3b645be321..770554cac0 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ParallelDataCollectionEventsHandler.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/ParallelDataCollectionEventsHandler.cs @@ -16,7 +16,7 @@ namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.DataCollection internal class ParallelDataCollectionEventsHandler : ParallelRunEventsHandler { private readonly ParallelRunDataAggregator runDataAggregator; - private readonly MultiTestRunsDataCollectorAttachmentsHandler attachmentsHandler; + private readonly DataCollectorAttachmentsHandler attachmentsHandler; public ParallelDataCollectionEventsHandler(IRequestData requestData, IProxyExecutionManager proxyExecutionManager, @@ -26,7 +26,7 @@ public ParallelDataCollectionEventsHandler(IRequestData requestData, this(requestData, proxyExecutionManager, actualRunEventsHandler, parallelProxyExecutionManager, runDataAggregator, JsonDataSerializer.Instance) { // TODO : use TestPluginCache to iterate over all IDataCollectorAttachments - attachmentsHandler = new MultiTestRunsDataCollectorAttachmentsHandler(new CodeCoverageDataAttachmentsHandler()); + attachmentsHandler = new DataCollectorAttachmentsHandler(new CodeCoverageDataAttachmentsHandler()); } internal ParallelDataCollectionEventsHandler(IRequestData requestData, diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/MultiTestRunsFinalization/MultiTestRunsFinalizationManager.cs b/src/Microsoft.TestPlatform.CrossPlatEngine/MultiTestRunFinalization/MultiTestRunFinalizationManager.cs similarity index 63% rename from src/Microsoft.TestPlatform.CrossPlatEngine/MultiTestRunsFinalization/MultiTestRunsFinalizationManager.cs rename to src/Microsoft.TestPlatform.CrossPlatEngine/MultiTestRunFinalization/MultiTestRunFinalizationManager.cs index 77ba2d5331..398ef08071 100644 --- a/src/Microsoft.TestPlatform.CrossPlatEngine/MultiTestRunsFinalization/MultiTestRunsFinalizationManager.cs +++ b/src/Microsoft.TestPlatform.CrossPlatEngine/MultiTestRunFinalization/MultiTestRunFinalizationManager.cs @@ -10,30 +10,30 @@ using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Engine; -namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.MultiTestRunsFinalization +namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.MultiTestRunFinalization { /// - /// Orchestrates multi test runs finalization operations for the engine communicating with the test host process. + /// Orchestrates multi test run finalization operations for the engine communicating with the test host process. /// - public class MultiTestRunsFinalizationManager : IMultiTestRunsFinalizationManager + public class MultiTestRunFinalizationManager : IMultiTestRunFinalizationManager { - private readonly MultiTestRunsDataCollectorAttachmentsHandler attachmentsHandler; + private readonly DataCollectorAttachmentsHandler attachmentsHandler; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public MultiTestRunsFinalizationManager(MultiTestRunsDataCollectorAttachmentsHandler attachmentsHandler) + public MultiTestRunFinalizationManager(DataCollectorAttachmentsHandler attachmentsHandler) { this.attachmentsHandler = attachmentsHandler; } /// - /// Finalizes multi test runs + /// Finalizes multi test run /// /// Attachments - /// EventHandler for handling multi test runs finalization events from Engine + /// EventHandler for handling multi test run finalization events from Engine /// Cancellation token - public async Task FinalizeMultiTestRunsAsync(ICollection attachments, IMultiTestRunsFinalizationEventsHandler eventHandler, CancellationToken cancellationToken) + public async Task FinalizeMultiTestRunAsync(ICollection attachments, IMultiTestRunFinalizationEventsHandler eventHandler, CancellationToken cancellationToken) { try { @@ -48,22 +48,22 @@ public async Task FinalizeMultiTestRunsAsync(ICollection attachme Task task = Task.Run(() => { attachmentsHandler.HandleAttachements(attachments, cancellationToken); - eventHandler.HandleMultiTestRunsFinalizationComplete(attachments); + eventHandler.HandleMultiTestRunFinalizationComplete(attachments); }); var completedTask = await Task.WhenAny(task, taskCompletionSource.Task); if (completedTask != task) { - eventHandler.HandleMultiTestRunsFinalizationComplete(null); + eventHandler.HandleMultiTestRunFinalizationComplete(null); } } catch (Exception e) { - EqtTrace.Error("MultiTestRunsFinalizationManager: Exception in FinalizeMultiTestRunsAsync: " + e); + EqtTrace.Error("MultiTestRunFinalizationManager: Exception in FinalizeMultiTestRunAsync: " + e); eventHandler.HandleLogMessage(ObjectModel.Logging.TestMessageLevel.Error, e.Message); - eventHandler.HandleMultiTestRunsFinalizationComplete(null); + eventHandler.HandleMultiTestRunFinalizationComplete(null); } } diff --git a/src/Microsoft.TestPlatform.ObjectModel/Adapter/Interfaces/IFrameworkHandle.cs b/src/Microsoft.TestPlatform.ObjectModel/Adapter/Interfaces/IFrameworkHandle.cs index 4e71e2e870..947b857477 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Adapter/Interfaces/IFrameworkHandle.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/Adapter/Interfaces/IFrameworkHandle.cs @@ -12,7 +12,7 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter public interface IFrameworkHandle : ITestExecutionRecorder, IMessageLogger { /// - /// Gets or sets a value indicating whether the execution framework enables the shutdown of execution process after the test run is complete. This should be used only in out of process test runs when IRunContext.KeepAlive is true + /// Gets or sets a value indicating whether the execution framework enables the shutdown of execution process after the test run is complete. This should be used only in out of process test run when IRunContext.KeepAlive is true /// and should be used only when absolutely required as using it degrades the performance of the subsequent run. /// It throws InvalidOperationException when it is attempted to be enabled when keepAlive is false. /// diff --git a/src/Microsoft.TestPlatform.ObjectModel/Client/Interfaces/IMultiTestRunsFinalizationEventsHandler.cs b/src/Microsoft.TestPlatform.ObjectModel/Client/Interfaces/IMultiTestRunFinalizationEventsHandler.cs similarity index 55% rename from src/Microsoft.TestPlatform.ObjectModel/Client/Interfaces/IMultiTestRunsFinalizationEventsHandler.cs rename to src/Microsoft.TestPlatform.ObjectModel/Client/Interfaces/IMultiTestRunFinalizationEventsHandler.cs index ed4cbd7b8d..93484152da 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Client/Interfaces/IMultiTestRunsFinalizationEventsHandler.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/Client/Interfaces/IMultiTestRunFinalizationEventsHandler.cs @@ -6,14 +6,14 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Client { /// - /// Interface contract for handling multi test runs finalization complete events + /// Interface contract for handling multi test run finalization complete events /// - public interface IMultiTestRunsFinalizationEventsHandler : ITestMessageEventHandler + public interface IMultiTestRunFinalizationEventsHandler : ITestMessageEventHandler { /// - /// Dispatch MultiTestRunsFinalizationComplete event to listeners. + /// Dispatch MultiTestRunFinalizationComplete event to listeners. /// /// Attachments reprocessed. - void HandleMultiTestRunsFinalizationComplete(ICollection attachments); + void HandleMultiTestRunFinalizationComplete(ICollection attachments); } } \ No newline at end of file diff --git a/src/Microsoft.TestPlatform.ObjectModel/Client/Payloads/MultiTestRunsFinalizationPayload.cs b/src/Microsoft.TestPlatform.ObjectModel/Client/Payloads/MultiTestRunFinalizationPayload.cs similarity index 75% rename from src/Microsoft.TestPlatform.ObjectModel/Client/Payloads/MultiTestRunsFinalizationPayload.cs rename to src/Microsoft.TestPlatform.ObjectModel/Client/Payloads/MultiTestRunFinalizationPayload.cs index 63f81593e5..5066f0e3a9 100644 --- a/src/Microsoft.TestPlatform.ObjectModel/Client/Payloads/MultiTestRunsFinalizationPayload.cs +++ b/src/Microsoft.TestPlatform.ObjectModel/Client/Payloads/MultiTestRunFinalizationPayload.cs @@ -7,9 +7,9 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Client using System.Runtime.Serialization; /// - /// Class used to define the MultiTestRunsFinalizationPayload sent by the Vstest.console translation layers into design mode + /// Class used to define the MultiTestRunFinalizationPayload sent by the Vstest.console translation layers into design mode /// - public class MultiTestRunsFinalizationPayload + public class MultiTestRunFinalizationPayload { /// /// Settings used for the discovery request. diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Interfaces/ITranslationLayerRequestSender.cs b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Interfaces/ITranslationLayerRequestSender.cs index 9c19766e17..4200918f0c 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Interfaces/ITranslationLayerRequestSender.cs +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Interfaces/ITranslationLayerRequestSender.cs @@ -115,12 +115,12 @@ internal interface ITranslationLayerRequestSender : IDisposable /// Provides back all attachements to TestPlatform for additional processing (for example merging) /// /// List of attachements - /// - void FinalizeMultiTestRuns(ICollection attachments, IMultiTestRunsFinalizationEventsHandler multiTestRunsFinalizationCompleteEventsHandler); + /// + void FinalizeMultiTestRun(ICollection attachments, IMultiTestRunFinalizationEventsHandler multiTestRunFinalizationCompleteEventsHandler); /// - /// Cancels multi test runs finalization + /// Cancels multi test run finalization /// - void CancelMultiTestRunsFinalization(); + void CancelMultiTestRunFinalization(); } } diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Interfaces/IVsTestConsoleWrapper2.cs b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Interfaces/IVsTestConsoleWrapper2.cs index 5fbc6ce412..2eb0ccff72 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Interfaces/IVsTestConsoleWrapper2.cs +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Interfaces/IVsTestConsoleWrapper2.cs @@ -17,12 +17,12 @@ public interface IVsTestConsoleWrapper2 : IVsTestConsoleWrapper /// Provides back all attachements to TestPlatform for additional processing (for example merging) /// /// List of attachements - /// EventHandler to receive session complete event - void FinalizeMultiTestRuns(ICollection attachments, IMultiTestRunsFinalizationEventsHandler multiTestRunsFinalizationCompleteEventsHandler); + /// EventHandler to receive session complete event + void FinalizeMultiTestRun(ICollection attachments, IMultiTestRunFinalizationEventsHandler multiTestRunFinalizationCompleteEventsHandler); /// - /// Cancel last multi test runs finalization + /// Cancel last multi test run finalization /// - void CancelMultiTestRunsFinalization(); + void CancelMultiTestRunFinalization(); } } diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/Resources.Designer.cs b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/Resources.Designer.cs index 97fa3b3bd9..d1cee45a68 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/Resources.Designer.cs +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/Resources.Designer.cs @@ -64,9 +64,9 @@ internal Resources() { /// /// Looks up a localized string similar to The active Multi Test Runs Finalization was aborted.. /// - internal static string AbortedMultiTestRunsFinalization { + internal static string AbortedMultiTestRunFinalization { get { - return ResourceManager.GetString("AbortedMultiTestRunsFinalization", resourceCulture); + return ResourceManager.GetString("AbortedMultiTestRunFinalization", resourceCulture); } } diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/Resources.resx b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/Resources.resx index c4dbc5499f..ff17cc093a 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/Resources.resx +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/Resources.resx @@ -117,7 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + The active Multi Test Runs Finalization was aborted. diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.cs.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.cs.xlf index b294113385..819e22e1d4 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.cs.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.cs.xlf @@ -61,7 +61,7 @@ Soubor {0} neexistuje. - + The active Multi Test Runs Finalization was aborted. The active Multi Test Runs Finalization was aborted. diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.de.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.de.xlf index f872f51df0..0b8284ad05 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.de.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.de.xlf @@ -61,7 +61,7 @@ Die Datei "{0}" ist nicht vorhanden. - + The active Multi Test Runs Finalization was aborted. The active Multi Test Runs Finalization was aborted. diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.es.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.es.xlf index dae24bf8e2..c3f256ea4f 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.es.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.es.xlf @@ -61,7 +61,7 @@ El archivo {0} no existe - + The active Multi Test Runs Finalization was aborted. The active Multi Test Runs Finalization was aborted. diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.fr.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.fr.xlf index 4bb65df96e..9a0dfc259c 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.fr.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.fr.xlf @@ -61,7 +61,7 @@ Le fichier {0} n'existe pas - + The active Multi Test Runs Finalization was aborted. The active Multi Test Runs Finalization was aborted. diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.it.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.it.xlf index 4cba448970..1928a75bf6 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.it.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.it.xlf @@ -61,7 +61,7 @@ Il file {0} non esiste - + The active Multi Test Runs Finalization was aborted. The active Multi Test Runs Finalization was aborted. diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ja.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ja.xlf index fbb25bc10b..0c65c579e2 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ja.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ja.xlf @@ -61,7 +61,7 @@ ファイル {0} が存在しません - + The active Multi Test Runs Finalization was aborted. The active Multi Test Runs Finalization was aborted. diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ko.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ko.xlf index a66ea99bd5..273ff35d2c 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ko.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ko.xlf @@ -61,7 +61,7 @@ {0} 파일이 없습니다. - + The active Multi Test Runs Finalization was aborted. The active Multi Test Runs Finalization was aborted. diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.pl.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.pl.xlf index bb5ca13bac..59a2514c1a 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.pl.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.pl.xlf @@ -61,7 +61,7 @@ Plik {0} nie istnieje - + The active Multi Test Runs Finalization was aborted. The active Multi Test Runs Finalization was aborted. diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.pt-BR.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.pt-BR.xlf index 42cbe9c639..a2dfe8395f 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.pt-BR.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.pt-BR.xlf @@ -61,7 +61,7 @@ O arquivo {0} não existe - + The active Multi Test Runs Finalization was aborted. The active Multi Test Runs Finalization was aborted. diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ru.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ru.xlf index 2703ec8608..d4c27e0dc4 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ru.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.ru.xlf @@ -61,7 +61,7 @@ Файл {0} не существует. - + The active Multi Test Runs Finalization was aborted. The active Multi Test Runs Finalization was aborted. diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.tr.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.tr.xlf index c7602e8a39..8bc197a0b0 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.tr.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.tr.xlf @@ -61,7 +61,7 @@ {0} dosyası yok - + The active Multi Test Runs Finalization was aborted. The active Multi Test Runs Finalization was aborted. diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.xlf index 13c519fae0..1772dac841 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.xlf @@ -23,7 +23,7 @@ File {0} does not exists - + The active Multi Test Runs Finalization was aborted. The active Multi Test Runs Finalization was aborted. diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.zh-Hans.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.zh-Hans.xlf index 6913dfd7f4..6824d9b9db 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.zh-Hans.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.zh-Hans.xlf @@ -61,7 +61,7 @@ 文件 {0} 不存在 - + The active Multi Test Runs Finalization was aborted. The active Multi Test Runs Finalization was aborted. diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.zh-Hant.xlf b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.zh-Hant.xlf index 17c5464473..2d27648708 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.zh-Hant.xlf +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/Resources/xlf/Resources.zh-Hant.xlf @@ -61,7 +61,7 @@ 檔案 {0} 不存在 - + The active Multi Test Runs Finalization was aborted. The active Multi Test Runs Finalization was aborted. diff --git a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/VsTestConsoleRequestSender.cs b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/VsTestConsoleRequestSender.cs index e546068396..e4532e2191 100644 --- a/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/VsTestConsoleRequestSender.cs +++ b/src/Microsoft.TestPlatform.VsTestConsole.TranslationLayer/VsTestConsoleRequestSender.cs @@ -384,19 +384,19 @@ public void EndSession() } /// - public void FinalizeMultiTestRuns(ICollection attachments, IMultiTestRunsFinalizationEventsHandler testSessionEventsHandler) + public void FinalizeMultiTestRun(ICollection attachments, IMultiTestRunFinalizationEventsHandler testSessionEventsHandler) { this.SendMessageAndListenAndReportAttachements(attachments, testSessionEventsHandler); } /// - public void CancelMultiTestRunsFinalization() + public void CancelMultiTestRunFinalization() { if (EqtTrace.IsInfoEnabled) { - EqtTrace.Info("VsTestConsoleRequestSender.CancelMultiTestRunsFinalization: Canceling multi test runs finalization."); + EqtTrace.Info("VsTestConsoleRequestSender.CancelMultiTestRunFinalization: Canceling multi test run finalization."); } - this.communicationManager.SendMessage(MessageType.MultiTestRunsFinalizationCancel); + this.communicationManager.SendMessage(MessageType.MultiTestRunFinalizationCancel); } /// @@ -741,35 +741,35 @@ private async Task SendMessageAndListenAndReportTestResultsAsync(string messageT this.testPlatformEventSource.TranslationLayerExecutionStop(); } - private void SendMessageAndListenAndReportAttachements(ICollection attachments, IMultiTestRunsFinalizationEventsHandler eventHandler) + private void SendMessageAndListenAndReportAttachements(ICollection attachments, IMultiTestRunFinalizationEventsHandler eventHandler) { try { - var payload = new MultiTestRunsFinalizationPayload + var payload = new MultiTestRunFinalizationPayload { Attachments = attachments }; - this.communicationManager.SendMessage(MessageType.MultiTestRunsFinalizationStart, payload); - var isMultiTestRunsFinalizationComplete = false; + this.communicationManager.SendMessage(MessageType.MultiTestRunFinalizationStart, payload); + var isMultiTestRunFinalizationComplete = false; // Cycle through the messages that the vstest.console sends. // Currently each of the operations are not separate tasks since they should not each take much time. // This is just a notification. - while (!isMultiTestRunsFinalizationComplete) + while (!isMultiTestRunFinalizationComplete) { var message = this.TryReceiveMessage(); - if (string.Equals(MessageType.MultiTestRunsFinalizationComplete, message.MessageType)) + if (string.Equals(MessageType.MultiTestRunFinalizationComplete, message.MessageType)) { if (EqtTrace.IsInfoEnabled) { EqtTrace.Info("VsTestConsoleRequestSender.SendMessageAndListenAndReportAttachements: Process complete."); } - var multiTestRunsFinalizationCompletePayload = this.dataSerializer.DeserializePayload(message); + var multiTestRunFinalizationCompletePayload = this.dataSerializer.DeserializePayload(message); - eventHandler.HandleMultiTestRunsFinalizationComplete(multiTestRunsFinalizationCompletePayload.Attachments); - isMultiTestRunsFinalizationComplete = true; + eventHandler.HandleMultiTestRunFinalizationComplete(multiTestRunFinalizationCompletePayload.Attachments); + isMultiTestRunFinalizationComplete = true; } else if (string.Equals(MessageType.TestMessage, message.MessageType)) { @@ -781,8 +781,8 @@ private void SendMessageAndListenAndReportAttachements(ICollection - public void FinalizeMultiTestRuns(ICollection attachments, IMultiTestRunsFinalizationEventsHandler testSessionEventsHandler) + public void FinalizeMultiTestRun(ICollection attachments, IMultiTestRunFinalizationEventsHandler testSessionEventsHandler) { - this.testPlatformEventSource.TranslationLayerMultiTestRunsFinalizationStart(); + this.testPlatformEventSource.TranslationLayerMultiTestRunFinalizationStart(); this.EnsureInitialized(); - this.requestSender.FinalizeMultiTestRuns(attachments, testSessionEventsHandler); + this.requestSender.FinalizeMultiTestRun(attachments, testSessionEventsHandler); } /// - public void CancelMultiTestRunsFinalization() + public void CancelMultiTestRunFinalization() { throw new System.NotImplementedException(); } diff --git a/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs b/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs index 885b020e3f..0bcd0337d6 100644 --- a/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs +++ b/src/vstest.console/TestPlatformHelpers/TestRequestManager.cs @@ -13,7 +13,7 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.TestPlatformHelpers using System.Xml; using System.Xml.XPath; using Microsoft.VisualStudio.TestPlatform.Client; - using Microsoft.VisualStudio.TestPlatform.Client.MultiTestRunsFinalization; + using Microsoft.VisualStudio.TestPlatform.Client.MultiTestRunFinalization; using Microsoft.VisualStudio.TestPlatform.Client.RequestHelper; using Microsoft.VisualStudio.TestPlatform.CommandLine.Internal; using Microsoft.VisualStudio.TestPlatform.CommandLine.Processors.Utilities; @@ -26,7 +26,7 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.TestPlatformHelpers using Microsoft.VisualStudio.TestPlatform.Common.Utilities; using Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing; using Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.Interfaces; - using Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.MultiTestRunsFinalization; + using Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.MultiTestRunFinalization; using Microsoft.VisualStudio.TestPlatform.ObjectModel; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.Interfaces; @@ -53,7 +53,7 @@ internal class TestRequestManager : ITestRequestManager private readonly Task metricsPublisher; private bool isDisposed; private IProcessHelper processHelper; - private IMultiTestRunsFinalizationManager finalizationManager; + private IMultiTestRunFinalizationManager finalizationManager; /// /// Maintains the current active execution request @@ -68,7 +68,7 @@ internal class TestRequestManager : ITestRequestManager private IDiscoveryRequest currentDiscoveryRequest; /// - /// Maintains the current active multi test runs finalization cancellation token source + /// Maintains the current active multi test run finalization cancellation token source /// Assumption : There can only be one active finalization request. /// private CancellationTokenSource currentFinalizationCancellationTokenSource; @@ -84,11 +84,11 @@ public TestRequestManager() new InferHelper(AssemblyMetadataProvider.Instance), MetricsPublisherFactory.GetMetricsPublisher(IsTelemetryOptedIn(), CommandLineOptions.Instance.IsDesignMode), new ProcessHelper(), - new MultiTestRunsFinalizationManager(new CrossPlatEngine.DataCollection.MultiTestRunsDataCollectorAttachmentsHandler(new CodeCoverageDataAttachmentsHandler()))) + new MultiTestRunFinalizationManager(new CrossPlatEngine.DataCollection.DataCollectorAttachmentsHandler(new CodeCoverageDataAttachmentsHandler()))) { } - internal TestRequestManager(CommandLineOptions commandLineOptions, ITestPlatform testPlatform, TestRunResultAggregator testRunResultAggregator, ITestPlatformEventSource testPlatformEventSource, InferHelper inferHelper, Task metricsPublisher, IProcessHelper processHelper, IMultiTestRunsFinalizationManager finalizationManager) + internal TestRequestManager(CommandLineOptions commandLineOptions, ITestPlatform testPlatform, TestRunResultAggregator testRunResultAggregator, ITestPlatformEventSource testPlatformEventSource, InferHelper inferHelper, Task metricsPublisher, IProcessHelper processHelper, IMultiTestRunFinalizationManager finalizationManager) { this.testPlatform = testPlatform; this.commandLineOptions = commandLineOptions; @@ -319,9 +319,9 @@ public void RunTests(TestRunRequestPayload testRunRequestPayload, ITestHostLaunc /// EventHandler for discovered tests /// Protocol related information /// True, if successful - public void FinalizeMultiTestRuns(MultiTestRunsFinalizationPayload finalizationPayload, IMultiTestRunsFinalizationEventsHandler finalizationEventsHandler) + public void FinalizeMultiTestRun(MultiTestRunFinalizationPayload finalizationPayload, IMultiTestRunFinalizationEventsHandler finalizationEventsHandler) { - EqtTrace.Info("TestRequestManager.FinalizeMultiTestRuns: Multi test runs finalization started."); + EqtTrace.Info("TestRequestManager.FinalizeMultiTestRun: Multi test run finalization started."); // Make sure to run the run request inside a lock as the below section is not thread-safe // There can be only one discovery, execution or finalization request at a given point in time @@ -329,12 +329,12 @@ public void FinalizeMultiTestRuns(MultiTestRunsFinalizationPayload finalizationP { try { - EqtTrace.Info("TestRequestManager.FinalizeMultiTestRuns: Synchronization context taken"); - this.testPlatformEventSource.MultiTestRunsFinalizationRequestStart(); + EqtTrace.Info("TestRequestManager.FinalizeMultiTestRun: Synchronization context taken"); + this.testPlatformEventSource.MultiTestRunFinalizationRequestStart(); this.currentFinalizationCancellationTokenSource = new CancellationTokenSource(); - Task task = this.finalizationManager.FinalizeMultiTestRunsAsync(finalizationPayload.Attachments, finalizationEventsHandler, this.currentFinalizationCancellationTokenSource.Token); + Task task = this.finalizationManager.FinalizeMultiTestRunAsync(finalizationPayload.Attachments, finalizationEventsHandler, this.currentFinalizationCancellationTokenSource.Token); task.Wait(); } finally @@ -345,8 +345,8 @@ public void FinalizeMultiTestRuns(MultiTestRunsFinalizationPayload finalizationP this.currentFinalizationCancellationTokenSource = null; } - EqtTrace.Info("TestRequestManager.FinalizeMultiTestRuns: Multi test runs finalization completed."); - this.testPlatformEventSource.MultiTestRunsFinalizationRequestStop(); + EqtTrace.Info("TestRequestManager.FinalizeMultiTestRun: Multi test run finalization completed."); + this.testPlatformEventSource.MultiTestRunFinalizationRequestStop(); } } } @@ -393,11 +393,11 @@ public void AbortTestRun() } /// - /// Cancel the multi test runs finalization. + /// Cancel the multi test run finalization. /// - public void CancelMultiTestRunsFinalization() + public void CancelMultiTestRunFinalization() { - EqtTrace.Info("TestRequestManager.CancelMultiTestRunsFinalization: Sending cancel request."); + EqtTrace.Info("TestRequestManager.CancelMultiTestRunFinalization: Sending cancel request."); this.currentFinalizationCancellationTokenSource?.Cancel(); } diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/EventHandler/MultiTestRunsFinalizationEventHandler.cs b/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/EventHandler/MultiTestRunFinalizationEventHandler.cs similarity index 90% rename from test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/EventHandler/MultiTestRunsFinalizationEventHandler.cs rename to test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/EventHandler/MultiTestRunFinalizationEventHandler.cs index b2bad52b2d..0a1b77a832 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/EventHandler/MultiTestRunsFinalizationEventHandler.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/EventHandler/MultiTestRunFinalizationEventHandler.cs @@ -11,7 +11,7 @@ namespace Microsoft.TestPlatform.AcceptanceTests.TranslationLayerTests using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; /// - public class MultiTestRunsFinalizationEventHandler : IMultiTestRunsFinalizationEventsHandler + public class MultiTestRunFinalizationEventHandler : IMultiTestRunFinalizationEventsHandler { /// /// Gets the attachments. @@ -35,7 +35,7 @@ public class MultiTestRunsFinalizationEventHandler : IMultiTestRunsFinalizationE /// public TestMessageLevel TestMessageLevel { get; private set; } - public MultiTestRunsFinalizationEventHandler() + public MultiTestRunFinalizationEventHandler() { this.Errors = new List(); this.Attachments = new List(); @@ -75,7 +75,7 @@ public bool AttachDebuggerToProcess(int pid) return true; } - public void HandleMultiTestRunsFinalizationComplete(ICollection attachments) + public void HandleMultiTestRunFinalizationComplete(ICollection attachments) { if(attachments != null) { diff --git a/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/FinalizeMultiTestRunsTests.cs b/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/FinalizeMultiTestRunTests.cs similarity index 94% rename from test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/FinalizeMultiTestRunsTests.cs rename to test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/FinalizeMultiTestRunTests.cs index f2093e7b7f..12fd9ae8a7 100644 --- a/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/FinalizeMultiTestRunsTests.cs +++ b/test/Microsoft.TestPlatform.AcceptanceTests/TranslationLayerTests/FinalizeMultiTestRunTests.cs @@ -20,17 +20,17 @@ namespace Microsoft.TestPlatform.AcceptanceTests.TranslationLayerTests /// The Run Tests using VsTestConsoleWrapper API's /// [TestClass] - public class FinalizeMultiTestRunsTests : AcceptanceTestBase + public class FinalizeMultiTestRunTests : AcceptanceTestBase { private IVsTestConsoleWrapper2 vstestConsoleWrapper; private RunEventHandler runEventHandler; - private MultiTestRunsFinalizationEventHandler multiTestRunsFinalizationEventHandler; + private MultiTestRunFinalizationEventHandler multiTestRunFinalizationEventHandler; private void Setup() { this.vstestConsoleWrapper = this.GetVsTestConsoleWrapper(); this.runEventHandler = new RunEventHandler(); - this.multiTestRunsFinalizationEventHandler = new MultiTestRunsFinalizationEventHandler(); + this.multiTestRunFinalizationEventHandler = new MultiTestRunFinalizationEventHandler(); } [TestCleanup] @@ -42,7 +42,7 @@ public void Cleanup() [TestMethod] [NetFullTargetFrameworkDataSource] [NetCoreTargetFrameworkDataSource] - public void FinalizeMultiTestRuns(RunnerInfo runnerInfo) + public void FinalizeMultiTestRun(RunnerInfo runnerInfo) { AcceptanceTestBase.SetTestEnvironment(this.testEnvironment, runnerInfo); this.Setup(); @@ -53,11 +53,11 @@ public void FinalizeMultiTestRuns(RunnerInfo runnerInfo) Assert.AreEqual(6, this.runEventHandler.TestResults.Count); Assert.AreEqual(2, this.runEventHandler.Attachments.Count); - this.vstestConsoleWrapper.FinalizeMultiTestRuns(runEventHandler.Attachments, multiTestRunsFinalizationEventHandler); + this.vstestConsoleWrapper.FinalizeMultiTestRun(runEventHandler.Attachments, multiTestRunFinalizationEventHandler); // Assert - multiTestRunsFinalizationEventHandler.EnsureSuccess(); - Assert.AreEqual(testEnvironment.RunnerFramework.Equals(IntegrationTestBase.DesktopRunnerFramework) ? 1 : 2, this.multiTestRunsFinalizationEventHandler.Attachments.Count); + multiTestRunFinalizationEventHandler.EnsureSuccess(); + Assert.AreEqual(testEnvironment.RunnerFramework.Equals(IntegrationTestBase.DesktopRunnerFramework) ? 1 : 2, this.multiTestRunFinalizationEventHandler.Attachments.Count); } [TestMethod] @@ -76,7 +76,7 @@ public void EndSessionShouldEnsureVstestConsoleProcessDies(RunnerInfo runnerInfo Assert.AreEqual(6, this.runEventHandler.TestResults.Count); Assert.AreEqual(2, this.runEventHandler.Attachments.Count); - this.vstestConsoleWrapper.FinalizeMultiTestRuns(runEventHandler.Attachments, multiTestRunsFinalizationEventHandler); + this.vstestConsoleWrapper.FinalizeMultiTestRun(runEventHandler.Attachments, multiTestRunFinalizationEventHandler); this.vstestConsoleWrapper?.EndSession(); // Assert diff --git a/test/vstest.console.UnitTests/Processors/ListFullyQualifiedTestsArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/ListFullyQualifiedTestsArgumentProcessorTests.cs index 34d411989a..1c7cdef211 100644 --- a/test/vstest.console.UnitTests/Processors/ListFullyQualifiedTestsArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/ListFullyQualifiedTestsArgumentProcessorTests.cs @@ -45,7 +45,7 @@ public class ListFullyQualifiedTestsArgumentProcessorTests private Task mockMetricsPublisherTask; private Mock mockMetricsPublisher; private Mock mockProcessHelper; - private Mock mockFinalizationManager; + private Mock mockFinalizationManager; private static ListFullyQualifiedTestsArgumentExecutor GetExecutor(ITestRequestManager testRequestManager, IOutput output) { @@ -80,7 +80,7 @@ public ListFullyQualifiedTestsArgumentProcessorTests() this.mockAssemblyMetadataProvider.Setup(x => x.GetFrameWork(It.IsAny())).Returns(new FrameworkName(Constants.DotNetFramework40)); this.inferHelper = new InferHelper(this.mockAssemblyMetadataProvider.Object); this.mockProcessHelper = new Mock(); - this.mockFinalizationManager = new Mock(); + this.mockFinalizationManager = new Mock(); } /// diff --git a/test/vstest.console.UnitTests/Processors/ListTestsArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/ListTestsArgumentProcessorTests.cs index 86f2346f96..28812f3a3b 100644 --- a/test/vstest.console.UnitTests/Processors/ListTestsArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/ListTestsArgumentProcessorTests.cs @@ -43,7 +43,7 @@ public class ListTestsArgumentProcessorTests private Task mockMetricsPublisherTask; private Mock mockMetricsPublisher; private Mock mockProcessHelper; - private Mock mockFinalizationManager; + private Mock mockFinalizationManager; private static ListTestsArgumentExecutor GetExecutor(ITestRequestManager testRequestManager, IOutput output) { @@ -78,7 +78,7 @@ public ListTestsArgumentProcessorTests() this.mockAssemblyMetadataProvider.Setup(x => x.GetFrameWork(It.IsAny())).Returns(new FrameworkName(Constants.DotNetFramework40)); this.inferHelper = new InferHelper(this.mockAssemblyMetadataProvider.Object); this.mockProcessHelper = new Mock(); - this.mockFinalizationManager = new Mock(); + this.mockFinalizationManager = new Mock(); } /// diff --git a/test/vstest.console.UnitTests/Processors/RunSpecificTestsArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/RunSpecificTestsArgumentProcessorTests.cs index 082628a886..13a57eb932 100644 --- a/test/vstest.console.UnitTests/Processors/RunSpecificTestsArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/RunSpecificTestsArgumentProcessorTests.cs @@ -44,7 +44,7 @@ public class RunSpecificTestsArgumentProcessorTests private Task mockMetricsPublisherTask; private Mock mockMetricsPublisher; private Mock mockProcessHelper; - private Mock mockFinalizationManager; + private Mock mockFinalizationManager; private RunSpecificTestsArgumentExecutor GetExecutor(ITestRequestManager testRequestManager) { @@ -69,7 +69,7 @@ public RunSpecificTestsArgumentProcessorTests() this.mockProcessHelper = new Mock(); this.mockProcessHelper.Setup(x => x.GetCurrentProcessId()).Returns(1234); this.mockProcessHelper.Setup(x => x.GetProcessName(It.IsAny())).Returns("dotnet.exe"); - this.mockFinalizationManager = new Mock(); + this.mockFinalizationManager = new Mock(); } [TestMethod] diff --git a/test/vstest.console.UnitTests/Processors/RunTestsArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/RunTestsArgumentProcessorTests.cs index b14404d302..ac7d49b522 100644 --- a/test/vstest.console.UnitTests/Processors/RunTestsArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/RunTestsArgumentProcessorTests.cs @@ -48,7 +48,7 @@ public class RunTestsArgumentProcessorTests private Task mockMetricsPublisherTask; private Mock mockMetricsPublisher; private Mock mockProcessHelper; - private Mock mockFinalizationManager; + private Mock mockFinalizationManager; public RunTestsArgumentProcessorTests() { @@ -66,7 +66,7 @@ public RunTestsArgumentProcessorTests() .Returns(Architecture.X86); this.mockAssemblyMetadataProvider.Setup(x => x.GetFrameWork(It.IsAny())).Returns(new FrameworkName(Constants.DotNetFramework40)); this.mockProcessHelper = new Mock(); - this.mockFinalizationManager = new Mock(); + this.mockFinalizationManager = new Mock(); } [TestMethod] diff --git a/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs b/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs index 0dafd5eef6..02a16c39cc 100644 --- a/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs +++ b/test/vstest.console.UnitTests/TestPlatformHelpers/TestRequestManagerTests.cs @@ -56,7 +56,7 @@ public class TestRequestManagerTests private Task mockMetricsPublisherTask; private Mock mockMetricsPublisher; private Mock mockProcessHelper; - private Mock mockFinalizationManager; + private Mock mockFinalizationManager; private const string DefaultRunsettings = @" @@ -103,7 +103,7 @@ public TestRequestManagerTests() .Returns(new FrameworkName(Constants.DotNetFramework40)); this.mockProcessHelper.Setup(x => x.GetCurrentProcessId()).Returns(1234); this.mockProcessHelper.Setup(x => x.GetProcessName(It.IsAny())).Returns("dotnet.exe"); - this.mockFinalizationManager = new Mock(); + this.mockFinalizationManager = new Mock(); } [TestCleanup]