Repository navigation
Commit 4b1a1a7
committed
fix(tests): harden top-5 guarantee test and clear git caches in fixture
Seed 15173041 exposed that read_04's count-2 margin was too slim: stale
git-related module-level caches from a prior test on the same xdist
worker shaved 1 off each observed read_count, tying read_04 with
read_05-07 at count=1 and letting recency break the tie in favour of
read_07.
Two-pronged fix:
- Increase read counts so read_04 gets count=3 (formula max(3,7-i));
even with off-by-1 contamination it lands at 2 vs 1 for read_05-07.
- Clear five additional compact.py module-level dicts in tmp_data_dir
(_diff_stat_summary_cache, _uncommitted_changes_cache,
_is_git_repo_cache, _whole_diff_cache, _blocker_preview_cache) so
git-related state from other test modules cannot leak between tests.1 parent ca1c71b commit 4b1a1a7
2 files changed
Lines changed: 21 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
194 | 198 | | |
195 | 199 | | |
196 | 200 | | |
197 | 201 | | |
198 | | - | |
199 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
200 | 212 | | |
201 | 213 | | |
202 | | - | |
203 | | - | |
| 214 | + | |
204 | 215 | | |
205 | 216 | | |
206 | 217 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5393 | 5393 | | |
5394 | 5394 | | |
5395 | 5395 | | |
5396 | | - | |
5397 | | - | |
5398 | | - | |
5399 | | - | |
5400 | | - | |
| 5396 | + | |
| 5397 | + | |
| 5398 | + | |
| 5399 | + | |
| 5400 | + | |
5401 | 5401 | | |
5402 | | - | |
| 5402 | + | |
5403 | 5403 | | |
5404 | 5404 | | |
5405 | 5405 | | |
| |||
0 commit comments