Skip to content

Sequential test collection is declared but no test class joins it #548

Description

@ptr727

CreateMatrixTests/Fixture.cs:7 declares

[CollectionDefinition("Sequential Test Collection", DisableParallelization = true)]
public class SequentialCollectionDefinition;

but none of the six test classes (CommandLineTests, ComposeFileTests, DockerFileTests,
ReleasesTests, VersionForwardTests, VersionInfoTests) carries
[Collection("Sequential Test Collection")]. In xUnit v3 DisableParallelization applies only
to the classes that join the named collection, so the definition is inert and every test class
still runs in the default parallel collection.

That is dead configuration either way, but which direction to fix it in is a real decision:

  • If the suite genuinely needs sequential execution, the classes need the [Collection(...)]
    attribute, or the assembly needs
    [assembly: CollectionBehavior(DisableTestParallelization = true)].
  • If it does not (the fixture-based tests each create their own GUID-named temp directory, so
    they look parallel-safe today), the definition should be deleted rather than wired up.

Raised by CodeRabbit on #547, which only touched this file to renormalize its line endings.
Deferred out of that PR because it is pre-existing and belongs to test design rather than the
line-ending drift class.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions