testUnsupportedVersion() — netty Function Reference
Architecture documentation for the testUnsupportedVersion() function in WebSocketServerHandshakerFactoryTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 3c48d1ad_5bb3_d2e6_5501_999bfeb08ea5["testUnsupportedVersion()"] 349479bf_fb91_9a84_12ba_8e0530102418["WebSocketServerHandshakerFactoryTest"] 3c48d1ad_5bb3_d2e6_5501_999bfeb08ea5 -->|defined in| 349479bf_fb91_9a84_12ba_8e0530102418 style 3c48d1ad_5bb3_d2e6_5501_999bfeb08ea5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshakerFactoryTest.java lines 34–54
@Test
public void testUnsupportedVersion() throws Exception {
EmbeddedChannel ch = new EmbeddedChannel();
WebSocketServerHandshakerFactory.sendUnsupportedVersionResponse(ch);
ch.runPendingTasks();
Object msg = ch.readOutbound();
if (!(msg instanceof FullHttpResponse)) {
fail("Got wrong response " + msg);
}
FullHttpResponse response = (FullHttpResponse) msg;
assertEquals(HttpResponseStatus.UPGRADE_REQUIRED, response.status());
assertEquals(WebSocketVersion.V13.toHttpHeaderValue(),
response.headers().get(HttpHeaderNames.SEC_WEBSOCKET_VERSION));
assertTrue(HttpUtil.isContentLengthSet(response));
assertEquals(0, HttpUtil.getContentLength(response));
ReferenceCountUtil.release(response);
assertFalse(ch.finish());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testUnsupportedVersion() do?
testUnsupportedVersion() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshakerFactoryTest.java.
Where is testUnsupportedVersion() defined?
testUnsupportedVersion() is defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshakerFactoryTest.java at line 34.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free