Skip to content

Stabilize MCP batch timeout concurrency lease test under full-suite load #4935

Description

@Widthdom

Description

McpServerTests.ProcessFrameAsync_BatchTimedOutActionRetainsConcurrencyLeaseUntilItDrains_Issue4536_Issue4545 can fail with a NullReferenceException at tests/CodeIndex.Tests/McpServerTests.cs:7158 under the full Release suite on .NET 8.

Observed behavior

  • One full Release run passed this test.
  • A later full Release run failed only this test on .NET 8 while .NET 9 passed.
  • Three immediate isolated .NET 8 reruns all passed (3/3).

This suggests a load-sensitive race or an assertion that dereferences a missing response without first reporting the timed-out state.

Validation command

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

Related historical work: #4536, #4545.

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