Skip to content

test(azure): TestStreamer_Stop is flaky under CI load #584

Description

@jongio

TestStreamer_Stop in cli/src/internal/azure/realtime_test.go fails intermittently on CI. It failed once during PR #553 and passed on a plain re-run of the same job with no code changes.

Why it's flaky

The test sleeps a fixed 10ms to let the streamer goroutine start, then fails hard on a 1 second timeout (realtime_test.go:582 and :590). On a loaded runner 10ms isn't always enough for the goroutine to reach its receive, so Stop() can fire before anything is listening. The observed failure took 1.01s, right at the fatal timeout.

Evidence it's environmental, not a real bug

PR #553 touched zero files under cli/src/internal/azure/. Re-running the same job on the same commit passed.

Suggested fix

Replace the fixed sleep with real synchronization: have the streamer signal readiness on a channel and block on it, or use require.Eventually. Raising the timeout would only make the flake rarer, not remove it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lane/testciSwarm lane: test and CI workflow fixestest-healthTest suite health findings

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions