Skip to content

test: stabilize stream reliability lifecycle waits - #10226

Draft
ReubenBond wants to merge 5 commits into
dotnet:mainfrom
ReubenBond:streaming-reliability-deterministic
Draft

test: stabilize stream reliability lifecycle waits#10226
ReubenBond wants to merge 5 commits into
dotnet:mainfrom
ReubenBond:streaming-reliability-deterministic

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Jun 15, 2026

Copy link
Copy Markdown
Member

This addresses flakiness in the SMS stream reliability lifecycle tests by making post-lifecycle readiness checks deterministic instead of relying on silo-count checks and fixed polling loops.

The change targets these tests:

  • UnitTests.Streaming.Reliability.StreamReliabilityTests.SMS_StreamRel_AllSilosRestart
  • UnitTests.Streaming.Reliability.StreamReliabilityTests.SMS_StreamRel_AllSilosRestart_PubSubCounts
  • UnitTests.Streaming.Reliability.StreamReliabilityTests.SMS_StreamRel_SiloDies_Consumer
  • UnitTests.Streaming.Reliability.StreamReliabilityTests.SMS_StreamRel_SiloDies_Producer
  • UnitTests.Streaming.Reliability.StreamReliabilityTests.SMS_StreamRel_SiloRestarts_Consumer
  • UnitTests.Streaming.Reliability.StreamReliabilityTests.SMS_StreamRel_SiloRestarts_Producer

It also improves shared pub/sub count diagnostics used by related streaming tests.

The solution now:

  • waits for liveness and cluster manifest stabilization after silo lifecycle changes
  • verifies producer and consumer grains are reachable before non-idempotent post-lifecycle sends
  • adds pay-for-use streaming diagnostic events for pulling-agent lifecycle, queue receiver initialization, and local stream registration
  • registers a test-only silo-side diagnostic recorder/probe so standalone silo tests can wait on silo-local stream readiness and delivery events
  • waits for producer registration, pulling-agent stream registration, subscription attachment, and item delivery before final assertions
  • adds FakeTimeProvider coverage for deterministic stream inactivity cleanup
Microsoft Reviewers: Open in CodeFlow

ReubenBond and others added 5 commits June 14, 2026 21:02
Wait for cluster liveness and manifest stabilization after silo lifecycle changes, then verify producer and consumer grains are reachable before post-lifecycle sends.

Use async condition waits for stream pub/sub and received-count checks so failures include the last observed counts and elapsed wait time.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add pay-for-use streaming diagnostic events for pulling agent lifecycle, queue receiver initialization, and local stream registration. Use silo-local diagnostic probes to wait for stream readiness and item delivery in StreamReliabilityTests, and add fake-time coverage for stream inactivity cleanup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace remaining sleep-based synchronization in StreamReliabilityTests with lifecycle, manifest, provider-readiness, producer/subscription registration, and item-delivery diagnostic signals. Convert pub/sub and receive-count helpers to final assertions after explicit waits.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant