Skip to content

Parallelizable attribute not invalidating invalid parallel scope combinations #2364

Closed
@evancam

Description

@evancam

I was looking through the ParallelizableAttribute.cs, and the changes made with #2264. I noticed that there is the functionality to invalidate tests with invalid parallel combinations in the ApplyToTest() method, but it does not appear to be actually invalidating them. Is this intentional?

Using 3.7.1,
I tested and was able to reproduce the hanging found in #2261 by placing [NonParallelizable] on the test fixture, and [Parallelizable(ParallelScope.Self)] on the test method.

I placed [Parallelizable(ParallelScope.Fixture)] on a test method with no parallelization on the fixture, and the tests ran and passed normally without any parallelization.

Instead of invalidating the setting, it could potentially be useful. What are your thoughts on allowing ParallelScope.Fixtures for methods? It would be useful in the case where you would only like to run one particular test one at a time at the fixture level, but run the rest of the tests in the fixture at ParallelScope.Self. It allows for the specific test in the fixture to be isolated without affecting other fixtures in the way ParallelScope.None does.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions