test: bump remaining 1ms channel-wait timeouts to 1s#421
Draft
aaron-zeisler wants to merge 1 commit into
Draft
Conversation
These tests pass a hardcoded time.Millisecond timeout to AssertChannelClosed, which waits on a channel closed by a producer goroutine. Under -race on slower or loaded CI runners, 1ms leaves no margin and the wait can time out before the close is observed even though nothing is wrong. Bump these to time.Second, matching the fix already applied elsewhere for the same pattern, while still failing fast on a genuine hang.
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
Bumps the remaining hardcoded
time.Millisecondchannel-wait timeouts totime.Second. This is a follow-up to #420Background
A repo-wide grep for
time.Millisecondused withAssertChannelClosed/RequireValue/WaitForUpsert/WaitForInit/WaitForNextInitfound six more call sites carrying the same 1ms-timeout pattern already identified as a source of CI flakiness under-raceon slower runners (see #420, which fixes the same pattern intesthelpers/ldtestdata). These sites haven't been observed failing yet, but they wait on a channel populated by a producer goroutine with effectively no margin, so they carry the same latent risk. This closes out the pattern across the rest of the repo.Changes
ldclient_listeners_fdv2_test.go,ldclient_listeners_test.go,testhelpers/ldtestdatav2/test_data_source_test.go,internal/flag_tracker_impl_test.go,internal/broadcasters_test.go,ldfiledatav2/file_data_source_test.go: bumptime.Millisecond→time.SecondonAssertChannelClosedcalls.