Repository navigation
Conversation
Motivation: The client checks that a text frame survives the HTTP-to-WebSocket handoff when it arrives with the upgrade response. A binary frame uses a different message decoding path. Modification: Run the same successful upgrade scenario for text and binary frames. Verify the exact message and successful upgrade, release every probe in finally, and assert all materialized stages stop. Result: Both inbound message types are covered at the upgrade boundary. Each case stops its streams even when an assertion fails. Production behavior is unchanged. Tests: On JDK 17, three focused cases passed on Scala 2.13.18 and 3.3.9 using the exact test source and current handshake source overlays. Scoped Scalafmt and git diff --check passed. References: RFC 6455 sections 4.1 and 5.6. The binary boundary is inspired by Netty 4.2 WebSocketClientHandshakerTest.
He-Pin
force-pushed
the
test/websocket-first-binary-frame-with-upgrade
branch
from
November 26, 2026 23:57
7c51acb to
3d3e550
Compare
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.
Motivation
The WebSocket client suite checks handover when a successful upgrade and the first text frame arrive together. It does not exercise binary frame handover under the same condition.
Modification
Keep the text control and add a binary case. In both cases deliver the successful upgrade response and a valid first frame in one transport input, then check the concrete message type, payload, and successful upgrade result.
Result
The client test now covers the text and binary paths across the HTTP-to-WebSocket handover. Production behavior is unchanged.
Tests
References
WebSocketClientHandshakerTestfirst binary frame handover cases.