Skip to content

test: bump remaining 1ms channel-wait timeouts to 1s#421

Draft
aaron-zeisler wants to merge 1 commit into
v7from
aaronz/fix-remaining-1ms-channel-timeouts
Draft

test: bump remaining 1ms channel-wait timeouts to 1s#421
aaron-zeisler wants to merge 1 commit into
v7from
aaronz/fix-remaining-1ms-channel-timeouts

Conversation

@aaron-zeisler

@aaron-zeisler aaron-zeisler commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Bumps the remaining hardcoded time.Millisecond channel-wait timeouts to time.Second. This is a follow-up to #420

Background

A repo-wide grep for time.Millisecond used with AssertChannelClosed/RequireValue/WaitForUpsert/WaitForInit/WaitForNextInit found six more call sites carrying the same 1ms-timeout pattern already identified as a source of CI flakiness under -race on slower runners (see #420, which fixes the same pattern in testhelpers/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: bump time.Millisecondtime.Second on AssertChannelClosed calls.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant