Skip to content

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than or equal to the size of the collection. (Parameter 'chunkLength') #15246

@Cyberboss

Description

@Cyberboss

Using Microsoft.NET.Test.Sdk 17.14.1 and MSTest adapter and framework 3.10.0

Source: tgstation/tgstation-server@2a0db24

Command line (Working directory: tests/Tgstation.Server.Tests):
dotnet test -c ReleaseNoWindows --filter TestCategory=RequiresDatabase --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true" --no-build --collect:"XPlat Code Coverage" --settings ../../build/ci.runsettings --results-directory ../../TestResults

2025-08-04T16:35:50.4726023Z Test run for /home/runner/work/tgstation-server/tgstation-server/tests/Tgstation.Server.Tests/bin/ReleaseNoWindows/net8.0/Tgstation.Server.Tests.dll (.NETCoreApp,Version=v8.0)
2025-08-04T16:35:50.5231368Z VSTest version 17.14.1 (x64)
2025-08-04T16:35:50.5274578Z 
2025-08-04T16:35:50.6081470Z Starting test execution, please wait...
2025-08-04T16:35:50.6386274Z A total of 1 test files matched the specified pattern.
2025-08-04T16:36:21.4770409Z 
2025-08-04T16:36:21.4820617Z ##[error]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.GetOut() in /_/src/Adapter/MSTestAdapter.PlatformServices/Services/TestContextImplementation.cs:line 428
   at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.InvokeAsync(Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.cs:line 166
   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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions