-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Area-dotnet testTest DebtuntriagedRequest triage from a team memberRequest triage from a team member
Description
Related: #51935
Related: #51934
Summary
This test was failing in the release/10.0.1xx and main branch for:
- linux (x64)
- macOS (arm64)
- macOS (x64)
Error Log
[xUnit.net 00:05:23.48] Microsoft.DotNet.Cli.Test.Tests.GivenDotnetTestBuildsAndRunsTestsWithArtifacts.RunTestProjectWithCodeCoverage_ShouldReturnExitCodeGenericFailure(configuration: "Release") [FAIL]
[xUnit.net 00:05:23.48] Expected value to be 2, but found 134 (difference of 132).
[xUnit.net 00:05:23.48] Stack Trace:
[xUnit.net 00:05:23.48] at FluentAssertions.Execution.LateBoundTestFramework.Throw(String message)
[xUnit.net 00:05:23.48] at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
[xUnit.net 00:05:23.48] at FluentAssertions.Execution.AssertionChain.FailWith(Func`1 getFailureReason)
[xUnit.net 00:05:23.48] at FluentAssertions.Numeric.NumericAssertionsBase`3.Be(T expected, String because, Object[] becauseArgs)
[xUnit.net 00:05:23.48] /Users/runner/work/1/s/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsWithArtifacts.cs(79,0): at Microsoft.DotNet.Cli.Test.Tests.GivenDotnetTestBuildsAndRunsTestsWithArtifacts.RunTestProjectWithCodeCoverage_ShouldReturnExitCodeGenericFailure(String configuration)
[xUnit.net 00:05:23.48] at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
[xUnit.net 00:05:23.48] at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
[xUnit.net 00:05:23.48] Output:
[xUnit.net 00:05:23.48] Executing 'dotnet test --coverage --configuration Release':
[xUnit.net 00:05:23.48] 》CSC : warning MSTEST0001: Explicitly enable or disable tests parallelization (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0001) [/private/tmp/helix/working/B7830A34/t/dotnetSdkTests.wESP9HpH/f03ffa48-df08---D4B1C8EE/TestProject/TestProject.csproj]
Running /tmp/helix/working/B7830A34/p/d/dotnet test --coverage --configuration Debug
> /tmp/helix/working/B7830A34/p/d/dotnet test --coverage --configuration Debug
[xUnit.net 00:05:23.48] 》/private/tmp/helix/working/B7830A34/t/dotnetSdkTests.wESP9HpH/f03ffa48-df08---D4B1C8EE/TestProject/Test1.cs(17,4): warning MSTEST0025: Use 'Assert.Fail' instead of an always-failing 'Assert.AreEqual' assert (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0025) [/private/tmp/helix/working/B7830A34/t/dotnetSdkTests.wESP9HpH/f03ffa48-df08---D4B1C8EE/TestProject/TestProject.csproj]
[xUnit.net 00:05:23.48] 》/private/tmp/helix/working/B7830A34/t/dotnetSdkTests.wESP9HpH/f03ffa48-df08---D4B1C8EE/TestProject/Test1.cs(11,4): warning MSTEST0032: Review or remove the assertion as its condition is known to be always true (https://learn.microsoft.com/dotnet/core/testing/mstest-analyzers/mstest0032) [/private/tmp/helix/working/B7830A34/t/dotnetSdkTests.wESP9HpH/f03ffa48-df08---D4B1C8EE/TestProject/TestProject.csproj]
[xUnit.net 00:05:23.48] 》Running tests from /private/tmp/helix/working/B7830A34/t/dotnetSdkTests.wESP9HpH/f03ffa48-df08---D4B1C8EE/TestProject/bin/Release/net10.0/TestProject.dll (net10.0|x64)
[xUnit.net 00:05:23.48] 》failed TestMethod2 (60ms)
[xUnit.net 00:05:23.48] 》 Assert.AreEqual failed. Expected:<1>. Actual:<2>. 'expected' expression: '1', 'actual' expression: '2'.
[xUnit.net 00:05:23.48] 》 from /private/tmp/helix/working/B7830A34/t/dotnetSdkTests.wESP9HpH/f03ffa48-df08---D4B1C8EE/TestProject/bin/Release/net10.0/TestProject.dll (net10.0|x64)
[xUnit.net 00:05:23.48] 》 Assert.AreEqual failed. Expected:<1>. Actual:<2>. 'expected' expression: '1', 'actual' expression: '2'.
[xUnit.net 00:05:23.48] 》 at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.ThrowAssertAreEqualFailed(Object expected, Object actual, String userMessage) in /_/src/TestFramework/TestFramework/Assertions/Assert.AreEqual.cs:665
[xUnit.net 00:05:23.48] 》 at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual[T](T expected, T actual, IEqualityComparer`1 comparer, String message, String expectedExpression, String actualExpression) in /_/src/TestFramework/TestFramework/Assertions/Assert.AreEqual.cs:492
[xUnit.net 00:05:23.48] 》 at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual[T](T expected, T actual, String message, String expectedExpression, String actualExpression) in /_/src/TestFramework/TestFramework/Assertions/Assert.AreEqual.cs:405
[xUnit.net 00:05:23.48] 》 at TestProject.Test1.TestMethod2() in /private/tmp/helix/working/B7830A34/t/dotnetSdkTests.wESP9HpH/f03ffa48-df08---D4B1C8EE/TestProject/Test1.cs:17
[xUnit.net 00:05:23.48] 》 at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[xUnit.net 00:05:23.48] 》 at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(1s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(4s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(7s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(10s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(13s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(16s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(19s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(23s)
[xUnit.net 00:05:23.49] 》
Process ID: 34886
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(26s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(29s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(32s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(35s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(38s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(41s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(45s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(48s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(51s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(54s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(57s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(1m 00s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(1m 04s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》[+1/x1/?0] TestProject.dll (net10.0|x64)(1m 07s)
[xUnit.net 00:05:23.49] 》
[xUnit.net 00:05:23.49] 》/private/tmp/helix/working/B7830A34/t/dotnetSdkTests.wESP9HpH/f03ffa48-df08---D4B1C8EE/TestProject/bin/Release/net10.0/TestProject.dll (net10.0|x64) failed with 1 error(s) (1m 07s 361ms)
[xUnit.net 00:05:23.49] 》Exit code: 134
[xUnit.net 00:05:23.49] 》 Error output: Unhandled exception. System.BadImageFormatException: Index not found. (0x80131124)
[xUnit.net 00:05:23.49] 》 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
[xUnit.net 00:05:23.50] 》 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()
[xUnit.net 00:05:23.50] 》 at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
[xUnit.net 00:05:23.50] 》 --- End of stack trace from previous location ---
[xUnit.net 00:05:23.50] 》 at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__124_1(Object state)
[xUnit.net 00:05:23.50] 》 at System.Threading.ThreadPoolWorkQueue.Dispatch()
[xUnit.net 00:05:23.50] 》 at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
[xUnit.net 00:05:23.50] 》 at System.Threading.Thread.StartCallback()
[xUnit.net 00:05:23.50] 》
[xUnit.net 00:05:23.50] 》
[xUnit.net 00:05:23.50] 》 In process file artifacts produced:
[xUnit.net 00:05:23.50] 》 - /private/tmp/helix/working/B7830A34/t/dotnetSdkTests.wESP9HpH/f03ffa48-df08---D4B1C8EE/TestProject/bin/Release/net10.0/TestResults/81c0aa32-17cd-45c7-b820-6a57a1ad6d98.coverage
[xUnit.net 00:05:23.50] 》
[xUnit.net 00:05:23.50] 》Test run summary: Failed!
[xUnit.net 00:05:23.50] 》 total: 2
[xUnit.net 00:05:23.50] 》 failed: 1
[xUnit.net 00:05:23.50] 》 succeeded: 1
[xUnit.net 00:05:23.50] 》 skipped: 0
[xUnit.net 00:05:23.50] 》 duration: 1m 09s 483ms
[xUnit.net 00:05:23.50] 》Test run completed with non-success exit code: 134 (see: https://aka.ms/testingplatform/exitcodes)
[xUnit.net 00:05:23.50] Command 'dotnet test --coverage --configuration Release' exited with exit code 134.
Failed Microsoft.DotNet.Cli.Test.Tests.GivenDotnetTestBuildsAndRunsTestsWithArtifacts.RunTestProjectWithCodeCoverage_ShouldReturnExitCodeGenericFailure(configuration: "Release") [1 m 17 s]
Error Message:
Expected value to be 2, but found 134 (difference of 132).
Stack Trace:
at FluentAssertions.Execution.LateBoundTestFramework.Throw(String message)
at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
at FluentAssertions.Execution.AssertionChain.FailWith(Func`1 getFailureReason)
at FluentAssertions.Numeric.NumericAssertionsBase`3.Be(T expected, String because, Object[] becauseArgs)
at Microsoft.DotNet.Cli.Test.Tests.GivenDotnetTestBuildsAndRunsTestsWithArtifacts.RunTestProjectWithCodeCoverage_ShouldReturnExitCodeGenericFailure(String configuration) in /Users/runner/work/1/s/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsWithArtifacts.cs:line 79
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
Metadata
Metadata
Assignees
Labels
Area-dotnet testTest DebtuntriagedRequest triage from a team memberRequest triage from a team member