Home / Function/ testInvalidChecksumDoesNotThrowException() — netty Function Reference

testInvalidChecksumDoesNotThrowException() — netty Function Reference

Architecture documentation for the testInvalidChecksumDoesNotThrowException() function in SnappyFrameDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  4ac8617e_7241_aba5_a926_130cc7469e8b["testInvalidChecksumDoesNotThrowException()"]
  8017c2dc_c3bf_3f79_0edd_8dd86487179d["SnappyFrameDecoderTest"]
  4ac8617e_7241_aba5_a926_130cc7469e8b -->|defined in| 8017c2dc_c3bf_3f79_0edd_8dd86487179d
  style 4ac8617e_7241_aba5_a926_130cc7469e8b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-compression/src/test/java/io/netty/handler/codec/compression/SnappyFrameDecoderTest.java lines 204–224

    @Test
    public void testInvalidChecksumDoesNotThrowException() {
        EmbeddedChannel channel = new EmbeddedChannel(new SnappyFrameDecoder(true));
        try {
            // checksum here is presented as a282986f (little endian)
            ByteBuf in = Unpooled.wrappedBuffer(new byte[]{
                    (byte) 0xff, 0x06, 0x00, 0x00, 0x73, 0x4e, 0x61, 0x50, 0x70, 0x59,
                    0x01, 0x09, 0x00, 0x00, 0x6f, -0x68, 0x2e, -0x47, 'n', 'e', 't', 't', 'y'
            });

            assertTrue(channel.writeInbound(in));
            ByteBuf expected = Unpooled.wrappedBuffer(new byte[] { 'n', 'e', 't', 't', 'y' });
            ByteBuf actual = channel.readInbound();
            assertEquals(expected, actual);

            expected.release();
            actual.release();
        } finally {
            channel.finishAndReleaseAll();
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testInvalidChecksumDoesNotThrowException() do?
testInvalidChecksumDoesNotThrowException() is a function in the netty codebase, defined in codec-compression/src/test/java/io/netty/handler/codec/compression/SnappyFrameDecoderTest.java.
Where is testInvalidChecksumDoesNotThrowException() defined?
testInvalidChecksumDoesNotThrowException() is defined in codec-compression/src/test/java/io/netty/handler/codec/compression/SnappyFrameDecoderTest.java at line 204.

Analyze Your Own Codebase

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

Try Supermodel Free