Skip to content

Flaky/racy test failure on .NET 10.0: DistributedCacheEventStreamStoreTests.ReadEventsAsync_InStreamingMode_YieldsNewlyWrittenEvents #1490

Description

@ericstj

Summary

The CI is failing under .NET 10.0 due to a test failure in the test suite:

  • Test: ModelContextProtocol.Tests.DistributedCacheEventStreamStoreTests.ReadEventsAsync_InStreamingMode_YieldsNewlyWrittenEvents

This test fails on .NET 10 while passing on earlier TFMs (net8/net9). See pipeline logs starting at:

[xUnit.net 00:01:23.69]     ModelContextProtocol.Tests.DistributedCacheEventStreamStoreTests.ReadEventsAsync_InStreamingMode_YieldsNewlyWrittenEvents [FAIL]
Failed!  - Failed:     1, Passed:  1884, Skipped:     4, Total:  1889, Duration: 3 m 19 s - ModelContextProtocol.Tests.dll (net10.0)

Most likely an intermittent failure.

Observed Behavior

  • The test expects events appended after a streaming query starts to be seen via the async enumerator.
  • Timing and/or notification race causes this test to fail only on net10.0.
  • Other test projects and all other TFMs pass for the same code revision.

Recommendation

  • Add a synchronization point so that the streaming enumerator is definitely active before appending events in the test.
  • Alternatively: audit the implementation to ensure the enumerator can never miss events regardless of ordering/timing of the append.

Optional:

  • Consider skipping or quarantining the test on net10.0 until race is fixed, to unblock CI.
  • Clean up procdump64.exe/setup so test blame diagnostics don't obscure build logs.

Activity

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

Metadata

Metadata

Labels

area-testsIssue related to testsbugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions