Open Evangelink opened 3 days ago
When parallelizing the tests [assembly: Parallelize(Workers = 0, Scope = ExecutionScope.MethodLevel)], the fixtures or methods are not respecting STA configuration.
[assembly: Parallelize(Workers = 0, Scope = ExecutionScope.MethodLevel)]
The problem is coming from these lines: https://github.com/microsoft/testfx/blob/main/src/Adapter/MSTest.TestAdapter/Execution/TestExecutionManager.cs#L316-L348. Similarly to what is done in the rest of the code, we should have a logic to use custom thread when in STA and keep using threadpool for when we don't need STA.
AB#2114780
Describe the bug
When parallelizing the tests
[assembly: Parallelize(Workers = 0, Scope = ExecutionScope.MethodLevel)]
, the fixtures or methods are not respecting STA configuration.Analysis
The problem is coming from these lines: https://github.com/microsoft/testfx/blob/main/src/Adapter/MSTest.TestAdapter/Execution/TestExecutionManager.cs#L316-L348. Similarly to what is done in the rest of the code, we should have a logic to use custom thread when in STA and keep using threadpool for when we don't need STA.
AB#2114780