fix(tests): add AbortSignal timeouts to thread-management integration suite#762
Open
kriszyp wants to merge 3 commits into
Open
fix(tests): add AbortSignal timeouts to thread-management integration suite#762kriszyp wants to merge 3 commits into
kriszyp wants to merge 3 commits into
Conversation
…management suite
Fetch calls had no timeout, so a slow or unavailable Harper instance on
Windows could leave them hanging indefinitely — causing the test subprocess
to produce no TAP output and surface as a cryptic file:1:1 failure.
Add AbortSignal.timeout(5000) to every fetch and { timeout: 15000 } to each
test so failures produce a clear message instead of a silent process crash.
Also extract authHeader/opsRequest helpers to remove the duplicated Basic-auth
encoding.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
Reviewed; no blockers found. |
…y tests After await concurrentWrites, all puts have committed but their subscription events may still be queued as async callbacks. Calling subscription.return() immediately can close the stream before those callbacks fire, silently dropping the last write(s). Adding await delay(200) gives pending events time to arrive so the assertions see all committed ids. Fixes the intermittent "missing concurrent id N" failure in the startTime, count, and !omitCurrent concurrent-write tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
signal: AbortSignal.timeout(5000)to everyfetchcall in the thread-management integration test suite via anopsRequesthelper{ timeout: 15000 }to eachtest()call so a slow Windows runner can't spin indefinitelyauthHeader/opsRequesthelpers to remove repeated Base64 boilerplateRoot cause
On Windows CI,
fetch()calls without anAbortSignalcan hang if Harper is momentarily unavailable between "successfully started" and the operations API actually accepting connections. With 20 concurrent requests outstanding and no timeout, the node:test child process produces no TAP output and the parent runner surfaces it as a crypticfile:1:1 'test failed'rather than a specific assertion error. AddingAbortSignal.timeoutensures failures produce a clearAbortErrorwith a meaningful message.Test plan
Integration Tests 2/4 (Windows, Node.js v24)passes (the shard that previously contained the flaky failure)