Home / Function/ testFailSlowTooLongFrameRecovery() — netty Function Reference

testFailSlowTooLongFrameRecovery() — netty Function Reference

Architecture documentation for the testFailSlowTooLongFrameRecovery() function in DelimiterBasedFrameDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  e80cef17_f3a5_bde6_70c5_0ffa5546e9d9["testFailSlowTooLongFrameRecovery()"]
  64c12b8a_8845_5e8d_1f49_6124cc8cd685["DelimiterBasedFrameDecoderTest"]
  e80cef17_f3a5_bde6_70c5_0ffa5546e9d9 -->|defined in| 64c12b8a_8845_5e8d_1f49_6124cc8cd685
  style e80cef17_f3a5_bde6_70c5_0ffa5546e9d9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-base/src/test/java/io/netty/handler/codec/frame/DelimiterBasedFrameDecoderTest.java lines 34–54

    @Test
    public void testFailSlowTooLongFrameRecovery() throws Exception {
        EmbeddedChannel ch = new EmbeddedChannel(
                new DelimiterBasedFrameDecoder(1, true, false, Delimiters.nulDelimiter()));

        for (int i = 0; i < 2; i ++) {
            ch.writeInbound(Unpooled.wrappedBuffer(new byte[] { 1, 2 }));
            try {
                assertTrue(ch.writeInbound(Unpooled.wrappedBuffer(new byte[] { 0 })));
                fail(DecoderException.class.getSimpleName() + " must be raised.");
            } catch (TooLongFrameException e) {
                // Expected
            }

            ch.writeInbound(Unpooled.wrappedBuffer(new byte[] { 'A', 0 }));
            ByteBuf buf = ch.readInbound();
            assertEquals("A", buf.toString(CharsetUtil.ISO_8859_1));

            buf.release();
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testFailSlowTooLongFrameRecovery() do?
testFailSlowTooLongFrameRecovery() is a function in the netty codebase, defined in codec-base/src/test/java/io/netty/handler/codec/frame/DelimiterBasedFrameDecoderTest.java.
Where is testFailSlowTooLongFrameRecovery() defined?
testFailSlowTooLongFrameRecovery() is defined in codec-base/src/test/java/io/netty/handler/codec/frame/DelimiterBasedFrameDecoderTest.java at line 34.

Analyze Your Own Codebase

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

Try Supermodel Free