Skip to content

Fix flaky timing-sensitive tests in blocks_store_queryable#7470

Merged
friedrichg merged 1 commit intomasterfrom
ci/fix-flaky-timing-tests
May 2, 2026
Merged

Fix flaky timing-sensitive tests in blocks_store_queryable#7470
friedrichg merged 1 commit intomasterfrom
ci/fix-flaky-timing-tests

Conversation

@friedrichg
Copy link
Copy Markdown
Member

What this PR does: Injects a nowFn clock into blocksStoreQuerier (following the existing pattern in distributorQueryable) so that tests can use a fixed time instead of relying on time.Now(). Replaces assert.InDelta with exact assert.Equal assertions, eliminating flaky failures caused by time drift on slower CI runners.

Affected tests:

  • TestBlocksStoreQuerier_SelectSortedShouldHonorQueryStoreAfter
  • TestBlocksStoreQuerier_MultiTenantQueryStoreAfter
  • TestBlocksStoreQuerier_QueryStoreAfterBoundary

Which issue(s) this PR fixes:
Fixes #7469

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
  • docs/configuration/v1-guarantees.md updated if this PR introduces experimental flags

Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 2, 2026
@friedrichg friedrichg merged commit f49d7fe into master May 2, 2026
67 of 69 checks passed
@friedrichg friedrichg deleted the ci/fix-flaky-timing-tests branch May 2, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size/S type/flaky-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI tests fail on slower GitHub-hosted runners

2 participants