Fix QueueSourceSpec flaky tests with proper stream cleanup#8029
Merged
Aaronontheweb merged 2 commits intoJan 25, 2026
Conversation
Wrapped three tests in AssertAllStagesStoppedAsync to ensure proper cleanup of stream stages before tests complete: - QueueSource_should_emit_received_message_to_the_stream - QueueSource_should_reject_elements_when_backpressuring_with_maxBuffer_0 - QueueSource_should_buffer_when_needed (the failing test from PR akkadotnet#8023) The failure "Failed to stop [QueueSourceSpec-920] within [00:00:05]" occurred because stream stages weren't properly stopped when tests ended with just sub.Cancel() without waiting for cleanup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AssertAllStagesStoppedAsyncto ensure proper cleanup of stream stagesQueueSource_should_buffer_when_neededtest failure from PR Fix TestActor initialization race in parallel test startup #8023Changes
Fixed tests:
QueueSource_should_emit_received_message_to_the_streamQueueSource_should_reject_elements_when_backpressuring_with_maxBuffer_0QueueSource_should_buffer_when_neededRoot Cause
The failure "Failed to stop [QueueSourceSpec-920] within [00:00:05]. ActorSystem is being forcefully shut down" occurred because stream stages weren't properly stopped when tests ended with just
sub.Cancel()without waiting for cleanup. Most other tests in this file already useAssertAllStagesStoppedAsyncto ensure proper cleanup.Test plan