test: add SendToChannel helper and replace bare channel sends in functional tests#9876
Merged
test: add SendToChannel helper and replace bare channel sends in functional tests#9876
Conversation
stephanos
approved these changes
Apr 8, 2026
stephanos
pushed a commit
that referenced
this pull request
Apr 13, 2026
…tional tests (#9876) ## What changed? Added a `SendToChannel(ctx, ch)` helper to `FunctionalTestBase`, mirroring the existing `WaitForChannel`, and replaced all bare `ch <- struct{}{}` sends in functional test bodies with calls to it. ## Why? Bare channel sends in test bodies silently hang when the receiving goroutine has stalled or died, causing tests to block until the overall test timeout rather than failing fast with a useful message. `WaitForChannel` already existed to solve this for receives, `SendToChannel` closes the gap for sends. ## How did you test it? - [ ] built - [ ] run locally and tested manually - [ ] covered by existing tests - [ ] added new unit test(s) - [ ] added new functional test(s) ## Potential risks None, this is a pure test-helper addition.
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.
What changed?
Added a
SendToChannel(ctx, ch)helper toFunctionalTestBase, mirroring the existingWaitForChannel, and replaced all barech <- struct{}{}sends in functional test bodies with calls to it.Why?
Bare channel sends in test bodies silently hang when the receiving goroutine has stalled or died, causing tests to block until the overall test timeout rather than failing fast with a useful message.
WaitForChannelalready existed to solve this for receives,SendToChannelcloses the gap for sends.How did you test it?
Potential risks
None, this is a pure test-helper addition.