Home / Function/ testFailSlowTooLongFrameRecovery() — netty Function Reference

testFailSlowTooLongFrameRecovery() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  d584ab2a_2e3c_64f1_0783_99c29b3cefaf["testFailSlowTooLongFrameRecovery()"]
  7e734a18_9dbb_0188_2134_ac583286d1f8["LengthFieldBasedFrameDecoderTest"]
  d584ab2a_2e3c_64f1_0783_99c29b3cefaf -->|defined in| 7e734a18_9dbb_0188_2134_ac583286d1f8
  style d584ab2a_2e3c_64f1_0783_99c29b3cefaf fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-base/src/test/java/io/netty/handler/codec/frame/LengthFieldBasedFrameDecoderTest.java lines 33–52

    @Test
    public void testFailSlowTooLongFrameRecovery() throws Exception {
        EmbeddedChannel ch = new EmbeddedChannel(
                new LengthFieldBasedFrameDecoder(5, 0, 4, 0, 4, false));

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

            ch.writeInbound(Unpooled.wrappedBuffer(new byte[] { 0, 0, 0, 1, 'A' }));
            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/LengthFieldBasedFrameDecoderTest.java.
Where is testFailSlowTooLongFrameRecovery() defined?
testFailSlowTooLongFrameRecovery() is defined in codec-base/src/test/java/io/netty/handler/codec/frame/LengthFieldBasedFrameDecoderTest.java at line 33.

Analyze Your Own Codebase

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

Try Supermodel Free