test: bump remaining 1ms channel-wait timeouts to 1s - #421
Open
aaron-zeisler wants to merge 2 commits into
Open
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.
aaron-zeisler
marked this pull request as ready for review
July 16, 2026 16:42
keelerm84
approved these changes
Jul 27, 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.
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.Note
Low Risk
Test-only timeout adjustments with no runtime behavior changes.
Overview
Follow-up to #420: every remaining
th.AssertChannelClosedcall that usedtime.Millisecondnow usestime.Second, so tests wait longer for listener removal and synchronizer shutdown to close channels.Touches broadcaster unregister tests, flag tracker listener tests (internal and
ldclientv1/v2), file data source close behavior, andldtestdatav2synchronizer close tests. No production code changes—only test timing.Reviewed by Cursor Bugbot for commit 68f0b7f. Bugbot is set up for automated code reviews on this repo. Configure here.