Skip to content

Make test suite parallel-safe by isolating console-dependent test behavior#262

Draft
Copilot wants to merge 2 commits into
dependabot/dotnet_sdk/dotnet-sdk-10.0.301from
copilot/fix
Draft

Make test suite parallel-safe by isolating console-dependent test behavior#262
Copilot wants to merge 2 commits into
dependabot/dotnet_sdk/dotnet-sdk-10.0.301from
copilot/fix

Conversation

Copilot AI commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

The test project was globally disabling xUnit parallelization to avoid cross-test interference. This change scopes that constraint to the single console-capturing test path so the rest of the suite can run in parallel safely.

  • Parallelization scope reduction

    • Removed assembly-level DisableTestParallelization from ListingManager.Tests.
    • Added a dedicated non-parallel xUnit collection for console-output-sensitive tests.
  • Targeted serialization for shared console state

    • Assigned ScanManagerTests to the new collection so only these tests are serialized.
    • Preserves isolation around Console.Out mutation without constraining unrelated tests.
  • Deterministic assertion behavior

    • Replaced brittle ordered output expectation with captured output line comparison that is order-insensitive.
    • Keeps semantic validation (Missing test for 1.1, Missing test for 2.4) while removing dependence on directory enumeration order.
[CollectionDefinition(Name, DisableParallelization = true)]
public sealed class ConsoleOutputCollection
{
    public const string Name = "Console output collection";
}

[Collection(ConsoleOutputCollection.Name)]
public class ScanManagerTests : TempFileTestBase
{
    [Fact]
    public void ScanForMissingTests()
    {
        // capture Console.Out, execute scan, compare normalized lines
    }
}

Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
Copilot AI changed the title Stabilize scan-tests output assertion by disabling xUnit test parallelization Make test suite parallel-safe by isolating console-dependent test behavior Jun 13, 2026
Copilot AI requested a review from BenjaminMichaelis June 13, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants