Repository navigation
Read a fixed disk in the resource governor tests - #431
Merged
Merged
Conversation
The disk lease tests staged their floor from the runner's real free space
and asserted exact gaps against later reads of it. Server test files run
two at a time and write to the same disk, so free space moved between the
probe and the governor's sample and the eviction request came out a MB off
("asked for the 500 MB gap, got 499 MB").
createResourceGovernor now takes an optional statDisk (fs.statfs by
default). Every governor in resources.test.ts reads a fixed disk, so the
gaps are asserted exactly, the reclaimTo tolerance is gone, and the lease
tests no longer skip on a small disk.
Signed-off-by: dillonstreator <dillonstreator@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…disk-lease-tests Signed-off-by: dillonstreator <dillonstreator@gmail.com> # Conflicts: # scripts/lint-baseline.json
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.
Why
`evicts scratch once for a lease shortfall before waiting` failed intermittently in CI with `asked for the 500 MB gap, got 499 MB`. The disk lease tests staged `MIN_FREE_DISK_MB` from the runner's real free space, then asserted exact gaps against the governor's later `statfs` reads. Server test files run two at a time on the same disk, so free space moved between the probe and the sample.
What
Test-only behaviour change, so the changeset is empty. The lint baseline drops by the non-null assertions removed.
Test
`node --import tsx --test test/resources.test.ts`: 47 pass, 0 skipped. Server typecheck, `pnpm lint` and `pnpm guards` pass.