Repository navigation
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 (optional) CI runners get a silent timeout hang instead of a diagnosable failure when the server side of the handshake fails after the client's side completed. At test/js/node/tls/node-tls-connect.test.ts:5631 the Promise.all awaits once(server, "secureConnection"), but a server-side handshake failure is reported through "tlsClientError" (src/js/node/net.ts:1361, 1495), never as a server "error", so events.once never rejects. The base branch awaited only the client and then failed fast at expect(accepted).toBe(1). Fix: wire every failure signal to reject the awaited promise: a server "tlsClientError" listener and a client "close"/"error" listener racing the Promise.all, as REVIEW.md requires for awaited conditions.
Why this was flagged
Trigger: the client finishes its TLS 1.3 handshake (once(client, established) resolves at test/js/node/tls/node-tls-connect.test.ts:5631) and the server then fails or never completes its side. Server failures are emitted as "tlsClientError" (net.ts:1361, net.ts:1495), not "error", so events.once(server, "secureConnection") never rejects. Once the client promise has settled, the error listener that events.once installed on the client is removed, so a later client "error" or "close" cannot reject the Promise.all either. The test then hangs until the per-test timeout with no message. On the base branch the same condition proceeded past the await, called client.connect, and failed quickly at expect(accepted).toBe(1) with "Expected: 1 Received: 0". REVIEW.md 'Tests reviewers reject' requires wiring every failure event to reject the awaited promise. Remedy: race the Promise.all against a rejecting listener on server "tlsClientError" and client "close".
Verification: test/js/node/tls/node-tls-connect.test.ts:5631
once(server, "secureConnection")has no failure wiring: in src/js/node/net.ts the handshake-failure path doesserver?.emit("tlsClientError", ...)(line 1495), nevererroronserver, so it never settles and the test runs into the per-test timeout. On the base branch the same situation failed fast atexpect(accepted).toBe(1)(line 5657).