Skip to content

Stabilize post-extraction hook isolation test in the full net8.0 suite #4689

Description

@Widthdom

Summary

The net8.0 Release full suite can intermittently fail PostExtractionHookTests.Discover_IsolatesModuleInitializerAndSeparatesDuplicateHookIds_Issue4600, even though the same test passes when rerun alone.

Observed behavior

Assert.Single() Failure: The collection did not contain any matching items
Expected:   (predicate expression)
Collection: [SymbolRecord { ... }]
PostExtractionHookTests.cs:183

The failure occurred in a simultaneous net8.0/net9.0 Release solution run after about 17 minutes. The net9.0 suite completed successfully. An immediate isolated net8.0 Release rerun passed in 7 seconds.

Reproduction commands

dotnet test CodeIndex.sln -c Release -p:UseSharedCompilation=false --no-build
dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj -c Release -f net8.0 -p:UseSharedCompilation=false --no-build --filter "FullyQualifiedName~Discover_IsolatesModuleInitializerAndSeparatesDuplicateHookIds_Issue4600"

Expected behavior

The hook isolation test should remain deterministic in the full multi-target suite, or be isolated from suite-level state that can suppress the expected hook result.

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