Home / Function/ testNotCloseOnProtocolViolation() — netty Function Reference

testNotCloseOnProtocolViolation() — netty Function Reference

Architecture documentation for the testNotCloseOnProtocolViolation() function in WebSocketUtf8FrameValidatorTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  44b1aa56_9599_c486_92ef_e9d0d005e327["testNotCloseOnProtocolViolation()"]
  5afab092_8064_6a0f_9ed4_1e250f5e1864["WebSocketUtf8FrameValidatorTest"]
  44b1aa56_9599_c486_92ef_e9d0d005e327 -->|defined in| 5afab092_8064_6a0f_9ed4_1e250f5e1864
  style 44b1aa56_9599_c486_92ef_e9d0d005e327 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketUtf8FrameValidatorTest.java lines 41–55

    @Test
    void testNotCloseOnProtocolViolation() {
        final EmbeddedChannel channel = new EmbeddedChannel(new Utf8FrameValidator(false));
        final TextWebSocketFrame frame = new TextWebSocketFrame(Unpooled.copiedBuffer(new byte[] { -50 }));
        assertThrows(CorruptedWebSocketFrameException.class, new Executable() {
            @Override
            public void execute() throws Throwable {
                channel.writeInbound(frame);
            }
        }, "bytes are not UTF-8");

        assertTrue(channel.isActive());
        assertFalse(channel.finish());
        assertEquals(0, frame.refCnt());
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free