fix(testutil): replace fixed sleep with polling for span flushing#488
Closed
pushkarscripts wants to merge 1 commit into
Closed
fix(testutil): replace fixed sleep with polling for span flushing#488pushkarscripts wants to merge 1 commit into
pushkarscripts wants to merge 1 commit into
Conversation
Signed-off-by: Pushkar Singh <pushkarkumarsingh1970@gmail.com>
Contributor
|
Closing, as it's duplicated #463 However, the WaitForTCP refactor is good, feel free to open a PR with that improvement |
7 tasks
txabman42
pushed a commit
that referenced
this pull request
May 14, 2026
## Description Replace the manual timeout loop in `WaitForTCP` with `require.Eventuallyf` for polling-based TCP readiness checks. ## Motivation This simplifies the readiness logic and keeps the polling behavior consistent with other test synchronization helpers. Follow-up extracted from #488. --- ## Checklist - [x] PR title follows [conventional commits](https://www.conventionalcommits.org/) format - [x] Code formatted: `make format` - [x] Linters pass: `make lint` - [x] Tests pass: `make test` - [ ] Tests added for new functionality - [x] Tests follow [testing guidelines](docs/testing.md) - [ ] Documentation updated (if applicable) Signed-off-by: Pushkar Singh <pushkarkumarsingh1970@gmail.com>
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.
Description
Replace fixed
time.Sleepusage in span flushing helpers with polling-based readiness checks usingrequire.Eventually.Also improves trace logging so spans are only logged on assertion failures instead of every successful run.
Motivation
Fixed sleep-based synchronization can introduce flaky behavior in integration/E2E tests depending on system and CI timing.
This change makes span flushing checks more reliable while also reducing noisy test logs during successful runs.
Checklist
make formatmake lintmake test