Repository navigation
Give timeoutDisarmedByCompletion room on a loaded machine - #8993
Merged
Merged
Conversation
The test armed a 40 ms idle timeout once the response headers arrived and failed if it fired before the body completed. On a busy macOS CI runner, reading the rest of the 3-byte response took longer than that: the timer fired, destroyed the request, and the test failed with an uncaught "aborted" in 87 ms. Use the 250 ms timeout that timeoutIsIdleNotDeadline already uses, and wait 300 ms after completion, longer than the timeout, so a timer the completion failed to disarm would still fire within the test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
danlapid
marked this pull request as ready for review
November 29, 2026 22:49
There was a problem hiding this comment.
✅ Approved — Test-only change that widens timing margins to fix a flake. No findings.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
📋 Code reviewer: ✅ LGTM
No issues found.
Reviewed commit: bdcc7fe3
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 a flake in
//src/tests/node/http-client:http-client-ts@, casetimeoutDisarmedByCompletion, seen on the macOS job in https://github.com/cloudflare/workerd/actions/runs/46317198669/job/141516706748:The test armed a 40 ms idle timeout once the response headers arrived, and it failed if the timeout fired before the body completed. On a loaded runner, reading the rest of the 3-byte response took longer than 40 ms, so the timer fired and destroyed the request.
This uses the 250 ms timeout that
timeoutIsIdleNotDeadlinealready uses, and waits 300 ms after completion. The wait is longer than the timeout, so a timer that completion failed to disarm would still fire during the test. The test now takes about 300 ms.Tested:
bazel test --runs_per_test=10onhttp-client-ts@,@all-compat-flagsand@all-autogates: 10/10 each, on Linux.🤖 Generated with Claude Code