Home / Function/ testInvalidChecksumThrowsException() — netty Function Reference

testInvalidChecksumThrowsException() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

codec-compression/src/test/java/io/netty/handler/codec/compression/SnappyFrameDecoderTest.java lines 183–202

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

            assertThrows(DecompressionException.class, new Executable() {
                @Override
                public void execute() {
                    channel.writeInbound(in);
                }
            });
        } finally {
            channel.finishAndReleaseAll();
        }
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free