Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make AssemblyInitialize/AssemblyCleanup inheritable #4677

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Merge branch 'main' into inheritable-fixtures

0134171
Select commit
Loading
Failed to load commit list.
Draft

Make AssemblyInitialize/AssemblyCleanup inheritable #4677

Merge branch 'main' into inheritable-fixtures
0134171
Select commit
Loading
Failed to load commit list.
Azure Pipelines / microsoft.testfx failed Jan 16, 2025 in 20m 15s

Build #20250116.29 had test failures

Details

Tests

  • Failed: 72 (0.37%)
  • Passed: 19,133 (99.63%)
  • Other: 0 (0.00%)
  • Total: 19,205
Code coverage

  • 96930 of 169088 blocks covered (57.33%)
  • 63813 of 109524 lines covered (58.26%)

Annotations

Check failure on line 0 in TestingPlatform

See this annotation in the file changed.

@azure-pipelines azure-pipelines / microsoft.testfx

TestingPlatform#L0

TestingPlatform(0,0): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Tests failed: /Users/runner/work/1/s/artifacts/log/Release/MSTest.Acceptance.IntegrationTests_net10.0_x64.log [net10.0|x64]

Check failure on line 0 in TestingPlatform

See this annotation in the file changed.

@azure-pipelines azure-pipelines / microsoft.testfx

TestingPlatform#L0

TestingPlatform(0,0): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Tests failed: /mnt/vss/_work/1/s/artifacts/log/Debug/MSTest.Acceptance.IntegrationTests_net10.0_x64.log [net10.0|x64]

Check failure on line 0 in TestingPlatform

See this annotation in the file changed.

@azure-pipelines azure-pipelines / microsoft.testfx

TestingPlatform#L0

TestingPlatform(0,0): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Tests failed: /mnt/vss/_work/1/s/artifacts/log/Release/MSTest.Acceptance.IntegrationTests_net10.0_x64.log [net10.0|x64]

Check failure on line 92 in test\UnitTests\MSTestAdapter.UnitTests\Execution\TestExecutionManagerTests.cs

See this annotation in the file changed.

@azure-pipelines azure-pipelines / microsoft.testfx

test\UnitTests\MSTestAdapter.UnitTests\Execution\TestExecutionManagerTests.cs#L92

test\UnitTests\MSTestAdapter.UnitTests\Execution\TestExecutionManagerTests.cs(92,9): error CS0618: (NETCORE_ENGINEERING_TELEMETRY=Build) 'TestExecutionManager.RunTests(IEnumerable<TestCase>, IRunContext?, IFrameworkHandle, TestRunCancellationToken)' is obsolete: 'Use RunTestsAsync instead.'

Check failure on line 1 in MSTest.Acceptance.IntegrationTests.ThreadContextTests.ThreadingContext_WhenChangedInAssemblyInitialize_IsPassedToTestMethod ("net9.0")

See this annotation in the file changed.

@azure-pipelines azure-pipelines / microsoft.testfx

MSTest.Acceptance.IntegrationTests.ThreadContextTests.ThreadingContext_WhenChangedInAssemblyInitialize_IsPassedToTestMethod ("net9.0")

Assert.AreEqual failed. Expected:<0>. Actual:<2>. Expression 'AssertExitCodeIs' failed for member 'SetCultureInFixtureMethodAndRunTests' at line 40 of file '/_/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextTests.cs'. Output of the test host is:
Command: /Users/runner/work/1/s/artifacts/tmp/Release/testsuite/cotQz/InitToTestThreadContextProject/bin/Release/net9.0/InitToTestThreadContextProject
====================
ExitCode: 2
====================
StandardOutput:
MSTest v3.8.0-ci (UTC 1/16/2025) [osx-x64 - .NET 9.0.0]
failed TestMethod1 (45ms)
  Assert.AreEqual failed. Expected:<th-TH>. Actual:<en-US>. 
    at InitToTestThreadContextProject.UnitTest1.TestMethod1() in /Users/runner/work/1/s/artifacts/tmp/Release/testsuite/cotQz/InitToTestThreadContextProject/UnitTest1.cs:43
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
    at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Test run summary: Failed! - /Users/runner/work/1/s/artifacts/tmp/Release/testsuite/cotQz/InitToTestThreadContextProject/bin/Release/net9.0/InitToTestThreadContextProject.dll (net9.0|x64)
  total: 1
  failed: 1
  succeeded: 0
  skipped: 0
  duration: 1s 179ms
====================
StandardError:
Raw output
   at Microsoft.Testing.Platform.Acceptance.IntegrationTests.Helpers.AcceptanceAssert.AssertExitCodeIs(TestHostResult testHostResult, Int32 exitCode, String callerMemberName, String callerFilePath, Int32 callerLineNumber) in /_/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Helpers/AcceptanceAssert.cs:line 9
   at MSTest.Acceptance.IntegrationTests.ThreadContextTests.SetCultureInFixtureMethodAndRunTests(String tfm, String envVarKey) in /_/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextTests.cs:line 40
   at MSTest.Acceptance.IntegrationTests.ThreadContextTests.ThreadingContext_WhenChangedInAssemblyInitialize_IsPassedToTestMethod(String tfm) in /_/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextTests.cs:line 24

Check failure on line 1 in MSTest.Acceptance.IntegrationTests.ThreadContextTests.ThreadingContext_WhenChangedInClassInitialize_IsPassedToTestMethod ("net9.0")

See this annotation in the file changed.

@azure-pipelines azure-pipelines / microsoft.testfx

MSTest.Acceptance.IntegrationTests.ThreadContextTests.ThreadingContext_WhenChangedInClassInitialize_IsPassedToTestMethod ("net9.0")

Assert.AreEqual failed. Expected:<0>. Actual:<2>. Expression 'AssertExitCodeIs' failed for member 'SetCultureInFixtureMethodAndRunTests' at line 40 of file '/_/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextTests.cs'. Output of the test host is:
Command: /Users/runner/work/1/s/artifacts/tmp/Release/testsuite/cotQz/InitToTestThreadContextProject/bin/Release/net9.0/InitToTestThreadContextProject
====================
ExitCode: 2
====================
StandardOutput:
MSTest v3.8.0-ci (UTC 1/16/2025) [osx-x64 - .NET 9.0.0]
failed TestMethod1 (110ms)
  Assert.AreEqual failed. Expected:<th-TH>. Actual:<en-US>. 
    at InitToTestThreadContextProject.UnitTest1.TestMethod1() in /Users/runner/work/1/s/artifacts/tmp/Release/testsuite/cotQz/InitToTestThreadContextProject/UnitTest1.cs:43
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
    at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Test run summary: Failed! - /Users/runner/work/1/s/artifacts/tmp/Release/testsuite/cotQz/InitToTestThreadContextProject/bin/Release/net9.0/InitToTestThreadContextProject.dll (net9.0|x64)
  total: 1
  failed: 1
  succeeded: 0
  skipped: 0
  duration: 1s 431ms
====================
StandardError:
Raw output
   at Microsoft.Testing.Platform.Acceptance.IntegrationTests.Helpers.AcceptanceAssert.AssertExitCodeIs(TestHostResult testHostResult, Int32 exitCode, String callerMemberName, String callerFilePath, Int32 callerLineNumber) in /_/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Helpers/AcceptanceAssert.cs:line 9
   at MSTest.Acceptance.IntegrationTests.ThreadContextTests.SetCultureInFixtureMethodAndRunTests(String tfm, String envVarKey) in /_/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextTests.cs:line 40
   at MSTest.Acceptance.IntegrationTests.ThreadContextTests.ThreadingContext_WhenChangedInClassInitialize_IsPassedToTestMethod(String tfm) in /_/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextTests.cs:line 29

Check failure on line 1 in MSTest.Acceptance.IntegrationTests.ThreadContextTests.ThreadingContext_WhenChangedInTestInitialize_IsPassedToTestMethod ("net9.0")

See this annotation in the file changed.

@azure-pipelines azure-pipelines / microsoft.testfx

MSTest.Acceptance.IntegrationTests.ThreadContextTests.ThreadingContext_WhenChangedInTestInitialize_IsPassedToTestMethod ("net9.0")

Assert.AreEqual failed. Expected:<0>. Actual:<2>. Expression 'AssertExitCodeIs' failed for member 'SetCultureInFixtureMethodAndRunTests' at line 40 of file '/_/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextTests.cs'. Output of the test host is:
Command: /Users/runner/work/1/s/artifacts/tmp/Release/testsuite/cotQz/InitToTestThreadContextProject/bin/Release/net9.0/InitToTestThreadContextProject
====================
ExitCode: 2
====================
StandardOutput:
MSTest v3.8.0-ci (UTC 1/16/2025) [osx-x64 - .NET 9.0.0]
failed TestMethod1 (237ms)
  Assert.AreEqual failed. Expected:<th-TH>. Actual:<en-US>. 
    at InitToTestThreadContextProject.UnitTest1.TestMethod1() in /Users/runner/work/1/s/artifacts/tmp/Release/testsuite/cotQz/InitToTestThreadContextProject/UnitTest1.cs:43
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
    at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Test run summary: Failed! - /Users/runner/work/1/s/artifacts/tmp/Release/testsuite/cotQz/InitToTestThreadContextProject/bin/Release/net9.0/InitToTestThreadContextProject.dll (net9.0|x64)
  total: 1
  failed: 1
  succeeded: 0
  skipped: 0
  duration: 1s 062ms
====================
StandardError:
Raw output
   at Microsoft.Testing.Platform.Acceptance.IntegrationTests.Helpers.AcceptanceAssert.AssertExitCodeIs(TestHostResult testHostResult, Int32 exitCode, String callerMemberName, String callerFilePath, Int32 callerLineNumber) in /_/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Helpers/AcceptanceAssert.cs:line 9
   at MSTest.Acceptance.IntegrationTests.ThreadContextTests.SetCultureInFixtureMethodAndRunTests(String tfm, String envVarKey) in /_/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextTests.cs:line 40
   at MSTest.Acceptance.IntegrationTests.ThreadContextTests.ThreadingContext_WhenChangedInTestInitialize_IsPassedToTestMethod(String tfm) in /_/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextTests.cs:line 34

Check failure on line 1 in MSTest.Acceptance.IntegrationTests.ThreadContextTests.ThreadingContext_CurrentCultureFlowsBetweenMethods ("net9.0")

See this annotation in the file changed.

@azure-pipelines azure-pipelines / microsoft.testfx

MSTest.Acceptance.IntegrationTests.ThreadContextTests.ThreadingContext_CurrentCultureFlowsBetweenMethods ("net9.0")

Assert.AreEqual failed. Expected:<0>. Actual:<2>. Expression 'AssertExitCodeIs' failed for member 'ThreadingContext_CurrentCultureFlowsBetweenMethods' at line 50 of file '/_/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextTests.cs'. Output of the test host is:
Command: /Users/runner/work/1/s/artifacts/tmp/Release/testsuite/qLxyk/CultureFlowsThreadContextProject/bin/Release/net9.0/CultureFlowsThreadContextProject
====================
ExitCode: 2
====================
StandardOutput:
MSTest v3.8.0-ci (UTC 1/16/2025) [osx-x64 - .NET 9.0.0]
failed TestMethod1 (0ms)
  Class Cleanup method UnitTest1.ClassCleanup failed. Error Message: Assert.AreEqual failed. Expected:<pt-BR>. Actual:<en-US>. ClassCleanup culture should have been the one set by TestCleanup. Stack Trace:    at CultureFlowsThreadContextProject.UnitTest1.ClassCleanup() in /Users/runner/work/1/s/artifacts/tmp/Release/testsuite/qLxyk/CultureFlowsThreadContextProject/UnitTest1.cs:line 66
     at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
     at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
    at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestClassInfo.ExecuteClassCleanup(TestContext testContext) in /_/src/Adapter/MSTest.TestAdapter/Execution/TestClassInfo.cs:701
    at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.UnitTestRunner.RunAssemblyCleanupIfNeeded(ITestContext testContext, ClassCleanupManager classCleanupManager, TypeCache typeCache, UnitTestResult[] results) in /_/src/Adapter/MSTest.TestAdapter/Execution/UnitTestRunner.cs:290
Test run summary: Failed! - /Users/runner/work/1/s/artifacts/tmp/Release/testsuite/qLxyk/CultureFlowsThreadContextProject/bin/Release/net9.0/CultureFlowsThreadContextProject.dll (net9.0|x64)
  total: 1
  failed: 1
  succeeded: 0
  skipped: 0
  duration: 1s 194ms
====================
StandardError:
Raw output
   at Microsoft.Testing.Platform.Acceptance.IntegrationTests.Helpers.AcceptanceAssert.AssertExitCodeIs(TestHostResult testHostResult, Int32 exitCode, String callerMemberName, String callerFilePath, Int32 callerLineNumber) in /_/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/Helpers/AcceptanceAssert.cs:line 9
   at MSTest.Acceptance.IntegrationTests.ThreadContextTests.ThreadingContext_CurrentCultureFlowsBetweenMethods(String tfm) in /_/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextTests.cs:line 50