Home / Function/ testInvalidHostWhenIncorrectWebSocketURI() — netty Function Reference

testInvalidHostWhenIncorrectWebSocketURI() — netty Function Reference

Architecture documentation for the testInvalidHostWhenIncorrectWebSocketURI() function in WebSocketClientHandshakerTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  898c3dea_6682_b350_2c89_c7534ff732a5["testInvalidHostWhenIncorrectWebSocketURI()"]
  2cb6ab9a_d30f_c725_5b7e_5ad8d513e6b9["WebSocketClientHandshakerTest"]
  898c3dea_6682_b350_2c89_c7534ff732a5 -->|defined in| 2cb6ab9a_d30f_c725_5b7e_5ad8d513e6b9
  style 898c3dea_6682_b350_2c89_c7534ff732a5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshakerTest.java lines 210–222

    @Test
    public void testInvalidHostWhenIncorrectWebSocketURI() {
        URI uri = URI.create("/ws");
        EmbeddedChannel channel = new EmbeddedChannel(new HttpClientCodec());
        final WebSocketClientHandshaker handshaker = newHandshaker(uri, null, null, false, true);
        final ChannelFuture handshakeFuture = handshaker.handshake(channel);

        assertFalse(handshakeFuture.isSuccess());
        assertInstanceOf(IllegalArgumentException.class, handshakeFuture.cause());
        assertEquals("Cannot generate the 'host' header value, webSocketURI should contain host" +
                     " or passed through customHeaders", handshakeFuture.cause().getMessage());
        assertFalse(channel.finish());
    }

Domain

Subdomains

Frequently Asked Questions

What does testInvalidHostWhenIncorrectWebSocketURI() do?
testInvalidHostWhenIncorrectWebSocketURI() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshakerTest.java.
Where is testInvalidHostWhenIncorrectWebSocketURI() defined?
testInvalidHostWhenIncorrectWebSocketURI() is defined in codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshakerTest.java at line 210.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free