Skip to content

test(share): allow a clock tick between the two shares in the pruning test - #623

Merged
jsenecal merged 1 commit into
mainfrom
fix/622-share-index-flake
Nov 25, 2026
Merged

jsenecal merged 1 commit into
mainfrom
fix/622-share-index-flake

Conversation

@jsenecal

Copy link
Copy Markdown
Collaborator

Closes #622

test_index_pruning_with_mixed_expiries asserted that the 90-day and 7-day shares' index scores differ by exactly 83 days. Each score is the Redis time at creation, in whole seconds, plus the lifetime. When the clock ticks between the two requests, the difference is 83 days plus 1 second. That's what failed on #621's CI.

The assertion now accepts 0 to 2 seconds above 83 days. The test still checks that the scores come from each share's own lifetime, which is what it's for, and the rest of the test is unchanged.

test_share.py: 147 passed. Ruff is clean.

No CHANGELOG entry: test-only change.

… test

Index scores are the Redis time at creation plus the lifetime, in whole seconds, so two shares created a second apart differ by 83 days plus 1 second. Accept up to 2 seconds of drift. Closes #622.
@jsenecal
jsenecal requested a review from WilhelmZA November 25, 2026 21:56
@github-actions github-actions Bot added the backend Python backend: API, models, state, execution label Nov 25, 2026

@WilhelmZA WilhelmZA left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving at 707c811e.

Checked that the assertion allows a clock tick between share creations while still checking each share’s lifetime; the commit is verified and the CI gate passed.

@WilhelmZA WilhelmZA added the reviewing Issue is being reviewed by maintainers label Nov 25, 2026
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 89.198%. remained the same — fix/622-share-index-flake into main

@jsenecal
jsenecal merged commit 27e4489 into main Nov 25, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Python backend: API, models, state, execution reviewing Issue is being reviewed by maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_index_pruning_with_mixed_expiries fails when the two shares are created in different seconds

3 participants