Repository navigation
test: Try to fix row-count race in flaky EmbeddedKafkaSupervisorTest - #19581
Merged
abhishekrb19 merged 1 commit intoJun 15, 2026
Merged
Conversation
test_runKafkaSupervisor produced 10 records, waited only for the broker to discover the datasource (the first matching metric event), then immediately asserted SELECT COUNT(*) == 10. Under a loaded CI runner the query raced ingestion and saw fewer than 10 rows (expected:<10> but was:<8/7/9>). Wait for ingest/events/processed to reach the expected count before querying, matching the sibling test_runSupervisor_withEmptyDimension, and derive the expected count from expectedSegments instead of a hardcoded literal.
kfaraz
approved these changes
Jun 15, 2026
Contributor
|
Thanks @amaechler. Saw this test flake a few times recently in some recent PRs as well. |
3 tasks done
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.
EmbeddedKafkaSupervisorTest.test_runKafkaSupervisoris flaky in CI:(observed values 7–9 across retries)
The test produces 10 records, waits only for the broker to discover the datasource (the first matching metric event), then immediately asserts
SELECT COUNT(*) == 10. Under a loaded CI runner the query races ingestion and observes fewer than 10 rows.This adds a wait on
ingest/events/processedreaching the expected count before the row-count assertion identical to whattest_runSupervisor_withEmptyDimensionin this file already uses.This PR has: