Repository navigation
Stop package_delay_hides_then_reveals flaking on its 1-second delay - #638
Merged
Merged
Conversation
The test gave its proxy a 1-second package delay and expected the listing and the direct download to both fall inside it. On CI's `test` job, which runs test binaries side by side, the second passed between the two calls, and the download answered 200 where the test wanted 404 (#604). The delay is now an hour, which no runner takes between two calls, and the window elapses by backdating the version's `first_seen_at` two hours instead of sleeping past it, as the e2e test of the same name already does. The test no longer reads the wall clock and no longer sleeps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012e6DJaQwXDu83fu8xUmtAc
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.
Fixes #604
What changed
package_delay_hides_then_reveals(crates/core/tests/proxy_read.rs) gave its proxy a 1-second package delay and expected both the listing and the direct download to fall inside it. On CI'stestjob, which runs test binaries side by side, that second could pass between the two calls (run 40574617151:direct download must 404 inside the delay window).The test now:
first_seen_attwo hours instead of sleeping 1.1 s past it.This is the deterministic form of the slack the issue asks for. The e2e test of the same name (
crates/e2e/tests/proxy.rs) already works this way for the same reason, and the file's other delay tests backdatefirst_seen_attoo. The test no longer reads the wall clock and no longer sleeps. The rest is unchanged: it still reuses the sameProxyRepoafter the window, so the download that succeeds afterwards still shows the in-window 404 was not negatively cached in memory or in the database.There is no changelog fragment because the change touches a test only and nobody running Forge would notice it (as with #486).
Checks
cargo test -p forge-core --test proxy_read: all 56 passcargo clippy -p forge-core --all-targets -- -D warnings: cleancargo fmt --all -- --check: cleanGenerated by Claude Code