-
Notifications
You must be signed in to change notification settings - Fork 284
Closed
Labels
Area: MSTestIssues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)Issues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)Regression
Milestone
Description
Describe the bug
We're seeing the same issue that was reported in #6246
Error Message:
An unhandled exception was thrown by the 'Execute' method. Please report this error to the author of the attribute 'Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute'.
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than or equal to the size of the collection. (Parameter 'chunkLength')
at System.Text.StringBuilder.ToString()
at Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestContextImplementation.GetDiagnosticMessages() in /_/src/Adapter/MSTestAdapter.PlatformServices/Services/TestContextImplementation.cs:line 338
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Extensions.TestContextExtensions.GetAndClearDiagnosticMessages(ITestContext testContext) in /_/src/Adapter/MSTestAdapter.PlatformServices/Extensions/TestContextExtensions.cs:line 17
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.InvokeAsync(Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.cs:line 169
at Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute.ExecuteAsync(ITestMethod testMethod) in /_/src/TestFramework/TestFramework/Attributes/TestMethod/TestMethodAttribute.cs:line 71
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodRunner.<>c__DisplayClass11_0.<<ExecuteTestAsync>b__0>d.MoveNext() in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodRunner.cs:line 472
--- End of stack trace from previous location ---
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodRunner.ExecuteTestAsync(TestMethodInfo testMethodInfo) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodRunner.cs:line 481
Steps To Reproduce
We upgraded 30+ applications without issue, but we have one where the tests hang, sometimes reporting this error. I'm sure it's not coincidence, but this is the only application we have that makes extensive use of Trace
opposed to ILogger
.
It sounds like the primary issue was resolved in #6246, but are there any other potential reasons this could fail on that line?
Expected behavior
Actual behavior
Additional context
Metadata
Metadata
Assignees
Labels
Area: MSTestIssues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)Issues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)Regression