test(cache): make purge insertion eligible after setup (#3790)

## Summary

Fix the release-blocking SQLite purge test fixture. Its setup performs
several stores (which advances the backend's intentional 60-second purge
throttle), then manually backdates one row and expects the immediately
following insert to purge it. Explicitly reset the purge eligibility
after backdating so the assertion tests metadata-only purge behavior
rather than suite timing.

## Validation

- Focused regression: 1 passed
- Full SQLite backend file: 23 passed, 4 skipped
- Ruff: clean
- git diff --check: clean
This commit is contained in:
JD Davis
2026-09-25 13:19:19 -05:00
committed by GitHub
parent 12c157966f
commit e64b9f58a2
+4
View File
@@ -213,6 +213,10 @@ class TestSQLiteBackend:
assert expired is not None
expired.created_at = time.time() - 11
backend.set(expired_hash, expired)
# The setup stores above intentionally exercised the periodic purge and
# advanced its 60-second throttle. Make the insertion under test eligible
# to purge the row we only just backdated.
backend._last_purge = 0.0
monkeypatch.setattr(
backend,