diff --git a/src/Adapter/MSTest.Engine/Helpers/TestFrameworkConstants.cs b/src/Adapter/MSTest.Engine/Helpers/TestFrameworkConstants.cs index 6523d05f7f..1ff235fcb4 100644 --- a/src/Adapter/MSTest.Engine/Helpers/TestFrameworkConstants.cs +++ b/src/Adapter/MSTest.Engine/Helpers/TestFrameworkConstants.cs @@ -6,5 +6,4 @@ namespace Microsoft.Testing.Framework; internal static class TestFrameworkConstants { public const string DefaultSemVer = MSTestEngineRepositoryVersion.Version; - public const string TestAdapterExecutorUri = "executor://testing-framework"; } diff --git a/src/Adapter/MSTest.Engine/TimeSheet.cs b/src/Adapter/MSTest.Engine/TimeSheet.cs index db5fb84217..e026329f66 100644 --- a/src/Adapter/MSTest.Engine/TimeSheet.cs +++ b/src/Adapter/MSTest.Engine/TimeSheet.cs @@ -33,11 +33,6 @@ public TimeSheet(IClock clock) /// public DateTimeOffset StopTime { get; private set; } - /// - /// Gets how long we've spent in queue before being executed. Precise, measured by Stopwatch. - /// - public TimeSpan DurationInQueue { get; private set; } - /// /// Gets how long we've spent executing the test. Precise, measured by Stopwatch. /// @@ -49,7 +44,6 @@ public TimeSheet(IClock clock) internal void RecordStart() { StartTime = _clock.UtcNow; - DurationInQueue = _stopwatch.Elapsed; _stopwatch.Restart(); } diff --git a/src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Helpers/VSTestTestNodeProperties.cs b/src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Helpers/VSTestTestNodeProperties.cs index 9a7d6b2daa..f64763a55e 100644 --- a/src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Helpers/VSTestTestNodeProperties.cs +++ b/src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Helpers/VSTestTestNodeProperties.cs @@ -5,11 +5,5 @@ namespace Microsoft.Testing.Extensions.VSTestBridge; internal static class VSTestTestNodeProperties { - internal const string Prefix = "vstest."; public const string OriginalExecutorUriPropertyName = "vstest.original-executor-uri"; - - public static class TestNode - { - public const string UidPropertyName = "vstest.testnode.uid"; - } } diff --git a/src/Platform/Microsoft.Testing.Platform/ServerMode/JsonRpc/Json/JsonExtensions.cs b/src/Platform/Microsoft.Testing.Platform/ServerMode/JsonRpc/Json/JsonExtensions.cs deleted file mode 100644 index 1e0792308f..0000000000 --- a/src/Platform/Microsoft.Testing.Platform/ServerMode/JsonRpc/Json/JsonExtensions.cs +++ /dev/null @@ -1,12 +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 System.Text.Json; - -namespace Microsoft.Testing.Platform.ServerMode.Json; - -internal static class JsonExtensions -{ - public static IEnumerable AllExcept(this JsonElement element, params string[] properties) - => element.EnumerateObject().Where(p => !properties.Any(n => p.NameEquals(n))); -} diff --git a/src/TestFramework/TestFramework/FrameworkConstants.cs b/src/TestFramework/TestFramework/FrameworkConstants.cs index 4e7d3e2418..e640cf2a59 100644 --- a/src/TestFramework/TestFramework/FrameworkConstants.cs +++ b/src/TestFramework/TestFramework/FrameworkConstants.cs @@ -14,5 +14,4 @@ internal static class FrameworkConstants internal const string DoNotUseStringAssertReferenceEquals = "StringAssert.ReferenceEquals should not be used for Assertions. Please use StringAssert methods or Assert.AreSame & overloads instead."; internal const string DoNotUseCollectionAssertEquals = "CollectionAssert.Equals should not be used for Assertions. Please use CollectionAssert.AreEqual & overloads instead."; internal const string DoNotUseCollectionAssertReferenceEquals = "CollectionAssert.ReferenceEquals should not be used for Assertions. Please use CollectionAssert methods or Assert.AreSame & overloads instead."; - internal const string TestTimeoutAttributeObsoleteMessage = "The 'TestTimeout' attribute is obsolete and will be removed in v4. Consider removing the 'Timeout' attribute or use the 'Timeout' attribute with the 'int.MaxValue' for infinite timeout."; } diff --git a/src/TestFramework/TestFramework/Internal/UtfHelper.cs b/src/TestFramework/TestFramework/Internal/UtfHelper.cs deleted file mode 100644 index 63356e0cb7..0000000000 --- a/src/TestFramework/TestFramework/Internal/UtfHelper.cs +++ /dev/null @@ -1,66 +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. - -namespace Microsoft.VisualStudio.TestTools.UnitTesting; - -/// -/// Provides helper functionality for the unit test framework. -/// -[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Requirement is to handle all kinds of user exceptions and message appropriately.")] -internal static class UtfHelper -{ - /// - /// Gets the exception messages, including the messages for all inner exceptions - /// recursively. - /// - /// Exception to get messages for. - /// string with error message information. - internal static string GetExceptionMsg(Exception ex) - { - DebugEx.Assert(ex != null, "exception is null"); - - StringBuilder result = new(); - bool first = true; - for (Exception? curException = ex; - curException != null; - curException = curException.InnerException) - { - // Get the exception message. Need to check for errors because the Message property - // may have been overridden by the exception type in user code. - string msg; - Type type = curException.GetType(); - try - { - msg = curException.Message; - } - catch - { - msg = string.Format( - CultureInfo.CurrentCulture, - FrameworkMessages.UTF_FailedToGetExceptionMessage, - type); - } - - if (first) - { - result.AppendFormat( - CultureInfo.CurrentCulture, - "{0}: {1}", - type, - msg); - } - else - { - result.AppendFormat( - CultureInfo.CurrentCulture, - " ---> {0}: {1}", - type, - msg); - } - - first = false; - } - - return result.ToString(); - } -}