Skip to content

test(drop): run past a small search budget instead of writing 50,001 files - #807

Merged
omartelo merged 1 commit into
mainfrom
test/drop-resolve-windows
Oct 17, 2026
Merged

omartelo merged 1 commit into
mainfrom
test/drop-resolve-windows

Conversation

@omartelo

Copy link
Copy Markdown
Collaborator

TestResolveRefusesTwinsSplitByTheBudget and TestResolveFindsShallowSiblingBeforeNoise have to run the search past its budget, and the budget was the maxEntries = 50_000 constant, so each wrote 50,001 files. On the Windows runner that took 38s and 37s (the timings table from #802, run 39056236000), most of internal/drop's 111s; on Linux about 1s each.

  • maxEntries is now a package var the tests replace, the same idiom as homeDir and sandboxAvailable in the same file. Production still uses 50,000.
  • smallBudget(t) sets it to 16 for one test and restores it. Both tests call it; their loops still write budget + 1 entries and their assertions are unchanged, so only the fixture size moves.

Checked: both tests now take 0.00s locally, and breaking the if scan.budget > 0 guard on purpose still fails TestResolveRefusesTwinsSplitByTheBudget with the wrong twin.

@omartelo
omartelo merged commit 4f67a23 into main Oct 17, 2026
7 checks passed
@omartelo
omartelo deleted the test/drop-resolve-windows branch October 17, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant