Home / Function/ testNotFailFast() — netty Function Reference

testNotFailFast() — netty Function Reference

Architecture documentation for the testNotFailFast() function in LineBasedFrameDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  df2541ae_ec39_195b_dd4f_51215342c3ff["testNotFailFast()"]
  619914ab_a3f8_75d9_9843_7bd13a7540ec["LineBasedFrameDecoderTest"]
  df2541ae_ec39_195b_dd4f_51215342c3ff -->|defined in| 619914ab_a3f8_75d9_9843_7bd13a7540ec
  style df2541ae_ec39_195b_dd4f_51215342c3ff fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-base/src/test/java/io/netty/handler/codec/LineBasedFrameDecoderTest.java lines 193–214

    @Test
    public void testNotFailFast() throws Exception {
        EmbeddedChannel ch = new EmbeddedChannel(new LineBasedFrameDecoder(2, false, false));
        assertFalse(ch.writeInbound(wrappedBuffer(new byte[] { 0, 1, 2 })));
        assertFalse(ch.writeInbound(wrappedBuffer(new byte[]{ 3, 4 })));
        try {
            ch.writeInbound(wrappedBuffer(new byte[] { '\n' }));
            fail();
        } catch (TooLongFrameException expected) {
            // Expected once we received a full frame.
        }
        assertFalse(ch.writeInbound(wrappedBuffer(new byte[] { '5' })));
        assertTrue(ch.writeInbound(wrappedBuffer(new byte[] { '\n' })));

        ByteBuf expected = wrappedBuffer(new byte[] { '5', '\n' });
        ByteBuf buffer = ch.readInbound();
        assertEquals(expected, buffer);
        expected.release();
        buffer.release();

        assertFalse(ch.finish());
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free