Repository navigation
Fix timing flakes in libs/apps/logstream tests - #7609
Merged
Merged
Conversation
TestBackoffStrategy_Wait asserted elapsed < 100ms around 50ms/20ms sleeps; CI runners observed 100-222ms. Keep the lower bound and use upper bounds that still distinguish "waited current" from "waited max" / "did not return on cancel". TestLogStreamerRetriesOnDialFailure gave the whole retry 300ms, of which 200ms is initialReconnectBackoff. Wait for msg1 with Eventually instead of a fixed deadline. TestLogStreamerRefreshesTokenAfterAuthClose read a bytes.Buffer from the test goroutine while the streamer wrote to it (go test -race); use syncBuffer like the other tests. Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
✅ Integration test reportCommit: ed81166
Top 3 slowest tests (at least 2 minutes):
|
denik
marked this pull request as ready for review
November 13, 2026 16:41
denik
enabled auto-merge
November 13, 2026 16:41
andrewnester
approved these changes
Nov 13, 2026
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.
Changes
Fix timing flakes in
libs/apps/logstreamtests:TestBackoffStrategy_Wait: the upper bounds were 100ms around 50ms/20ms waits; CI runners measured 100-222ms. Keep the lower bound, use a 10s max / 10s initial backoff so a 5s upper bound still tells "waited current, not max" and "returned on cancel" apart.TestLogStreamerRetriesOnDialFailure: the whole retry had a 300ms deadline, 200ms of which isinitialReconnectBackoff. Wait for msg1 withrequire.Eventually(10s) and then cancel, likeTestLogStreamerFollowTailWithoutPrefetchEmitsRequestedLines.TestLogStreamerRefreshesTokenAfterAuthClose: read abytes.Bufferfrom the test goroutine while the streamer wrote to it (go test -racereports it); usesyncBuffer. Same file and same kind of flake, so it is included here.Tests
go test -race ./libs/apps/logstream/ -count=30 -cpu=1,4passes (the race above failed it before).Dashboard
"119.547582ms" is not less than "100ms"(TestBackoffStrategy_Wait/blocks_for_duration, 9 failures in 9 PRs)streamer_test.go:166: "" does not contain "msg1"(TestLogStreamerRetriesOnDialFailure)This pull request and its description were written by Isaac.