Skip to content

test(llo): fix flaky records_telemetry test (INFOPLAT-19823) - #24271

Open
skippaDaBitFlippa wants to merge 1 commit into
developfrom
infoplat-19823-flaky-test-fix
Open

skippaDaBitFlippa wants to merge 1 commit into
developfrom
infoplat-19823-flaky-test-fix

Conversation

@skippaDaBitFlippa

@skippaDaBitFlippa skippaDaBitFlippa commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #24222.

Problem

The test Test_DataSource/Observe/records_telemetry fails sometimes. The observation loop creates a new telemetry channel for each iteration, and closes it at the end. The mock telemeter kept only the latest channel. The test read from that channel after Close, so it could read a new, empty channel instead of the channel that has the packets.

Fix

  • The mock now keeps every channel that it creates.
  • The test reads from all of them, and skips nil values.

Verification

  • Without the fix: the test fails under -race -count 50.
  • With the fix: it passes under -race -count 50.
  • The full package passes with -short -race.

The observation loop creates a new telemetry channel per iteration and closes it. The mock stored only the latest channel, so the test could read an empty one. Collect from every channel the mock created, and skip nils. Fails 50x under -race without the fix; passes with it.
@github-actions

Copy link
Copy Markdown
Contributor

👋 skippaDaBitFlippa, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

This branch has not been deployed

No deployments
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.

2 participants