Repository navigation
test(share): allow a clock tick between the two shares in the pruning test - #623
Merged
Merged
Conversation
… 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.
WilhelmZA
approved these changes
Nov 25, 2026
WilhelmZA
left a comment
Collaborator
There was a problem hiding this comment.
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.
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.
Closes #622
test_index_pruning_with_mixed_expiriesasserted 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.