Repository navigation
test(node-integration-tests): Make runner completion event-driven instead of polling - #22085
Merged
Merged
Conversation
mydea
requested review from
JPeer264 and
andreiborza
and removed request for
a team
July 8, 2026 12:04
Member
Author
|
Looking at runtimes for this specific PR, it does not immediately appear to be faster 😢 I think the change makes sense either way and is likely cleaner, so probably still good to merge from my POV. |
…tead of polling `completed()` and `makeRequest()` previously waited on a `waitFor` loop that polled every 100ms, so a test that had actually finished still idled up to a full poll tick before the runner noticed. Replace the two hot polling loops with deferred promises that `complete()` and the server-port parser resolve synchronously the instant they have a result, and race them against the existing timeouts. Removes up to ~100ms (avg ~50ms) of idle wall-clock from every `.completed()` call and from the first `makeRequest` of each server-based suite. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mydea
force-pushed
the
feat/node-it-event-completion
branch
from
July 8, 2026 12:47
e2d78c9 to
6b8149d
Compare
andreiborza
approved these changes
Jul 8, 2026
andreiborza
left a comment
Member
There was a problem hiding this comment.
Neat, I like the new helper!
49 tasks
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.
The test runner’s
completed()andmakeRequest()waited on awaitForloop that polled a flag every 100ms. Becausecomplete()(and the server-port parser) already flip their state synchronously the instant the expected envelope/port arrives, a test that had actually finished still idled up to a full poll tick before the runner noticed.This replaces the two hot polling loops with deferred promises resolved directly by
complete()and the port parser, raced against the existing timeouts. Same timeout / captured-log-dump / error behaviour — only the scheduling latency is removed.Removes up to ~100ms (avg ~50ms) of idle wall-clock from every
.completed()(hundreds of call sites) and from the firstmakeRequestof each server-based suite.🤖 Generated with Claude Code