test_a_flush_alone_does_not_vacuum¶
Tests › tests/test_indexcache_vacuum.py
What this test is for
Why it exists
THE SUCCESS PATH ONLY. A VACUUM rewrites the whole file; an aborted build that paid for one would pay it on every retry, which is the cost the cache exists to avoid.
Given
repo = tmp_path / "repo"repo.mkdir()
4 more
path = tmp_path / "clew.db.idxcache"cache = IndexCache(path, repo)_churn(cache)cache.close()
When
- —
Then
- ✓ _free_ratio(path) is greater than VACUUM_FREE_RATIO
tests/test_indexcache_vacuum.py:74 · its file's page
What it checks (1)
assert _free_ratio(path) > VACUUM_FREE_RATIOobserves_free_ratio
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
Call flow
test_a_flush_alone_does_not_vacuum→_churn→_free_ratioWhat it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-INDEX-002 measured