SnappyFrameDecoderTest Class — netty Architecture
Architecture documentation for the SnappyFrameDecoderTest class in SnappyFrameDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 8017c2dc_c3bf_3f79_0edd_8dd86487179d["SnappyFrameDecoderTest"] 4ca07cf9_45de_cd0a_e17b_6c4c87d06d26["SnappyFrameDecoderTest.java"] 8017c2dc_c3bf_3f79_0edd_8dd86487179d -->|defined in| 4ca07cf9_45de_cd0a_e17b_6c4c87d06d26 c79ab2ec_af59_2fd9_8b9d_02df3999c1d4["initChannel()"] 8017c2dc_c3bf_3f79_0edd_8dd86487179d -->|method| c79ab2ec_af59_2fd9_8b9d_02df3999c1d4 d5b446c9_d9bb_484f_5244_e8b5d72aad4d["tearDown()"] 8017c2dc_c3bf_3f79_0edd_8dd86487179d -->|method| d5b446c9_d9bb_484f_5244_e8b5d72aad4d 6df3bdaa_0706_f350_2c9c_41cca76852de["testReservedUnskippableChunkTypeCausesError()"] 8017c2dc_c3bf_3f79_0edd_8dd86487179d -->|method| 6df3bdaa_0706_f350_2c9c_41cca76852de b110c193_3211_c5e3_34a1_aac41cbab966["testInvalidStreamIdentifierLength()"] 8017c2dc_c3bf_3f79_0edd_8dd86487179d -->|method| b110c193_3211_c5e3_34a1_aac41cbab966 fc6b1183_f357_1c9b_9828_98c6cc31bb51["testInvalidStreamIdentifierValue()"] 8017c2dc_c3bf_3f79_0edd_8dd86487179d -->|method| fc6b1183_f357_1c9b_9828_98c6cc31bb51 b09b5b57_ecd6_911a_c4f5_c7c4a0912586["testReservedSkippableBeforeStreamIdentifier()"] 8017c2dc_c3bf_3f79_0edd_8dd86487179d -->|method| b09b5b57_ecd6_911a_c4f5_c7c4a0912586 f49e8701_1cee_e325_816e_34a83c7320ce["testUncompressedDataBeforeStreamIdentifier()"] 8017c2dc_c3bf_3f79_0edd_8dd86487179d -->|method| f49e8701_1cee_e325_816e_34a83c7320ce 9bea34ae_f9f3_76aa_3599_b160a399d719["testCompressedDataBeforeStreamIdentifier()"] 8017c2dc_c3bf_3f79_0edd_8dd86487179d -->|method| 9bea34ae_f9f3_76aa_3599_b160a399d719 6e2bb813_8d47_5cb4_a6d2_539794222fac["testReservedSkippableSkipsInput()"] 8017c2dc_c3bf_3f79_0edd_8dd86487179d -->|method| 6e2bb813_8d47_5cb4_a6d2_539794222fac 1e464029_7564_73ba_e102_0f654622586a["testUncompressedDataAppendsToOut()"] 8017c2dc_c3bf_3f79_0edd_8dd86487179d -->|method| 1e464029_7564_73ba_e102_0f654622586a f9f86a3a_592b_3bd2_6f87_7d921a9acf6c["testCompressedDataDecodesAndAppendsToOut()"] 8017c2dc_c3bf_3f79_0edd_8dd86487179d -->|method| f9f86a3a_592b_3bd2_6f87_7d921a9acf6c fe9b6ee6_0cf4_bee2_02ab_c13c006c7aba["testInvalidChecksumThrowsException()"] 8017c2dc_c3bf_3f79_0edd_8dd86487179d -->|method| fe9b6ee6_0cf4_bee2_02ab_c13c006c7aba 4ac8617e_7241_aba5_a926_130cc7469e8b["testInvalidChecksumDoesNotThrowException()"] 8017c2dc_c3bf_3f79_0edd_8dd86487179d -->|method| 4ac8617e_7241_aba5_a926_130cc7469e8b
Relationship Graph
Source Code
codec-compression/src/test/java/io/netty/handler/codec/compression/SnappyFrameDecoderTest.java lines 32–225
public class SnappyFrameDecoderTest {
private EmbeddedChannel channel;
@BeforeEach
public void initChannel() {
channel = new EmbeddedChannel(new SnappyFrameDecoder());
}
@AfterEach
public void tearDown() {
assertFalse(channel.finishAndReleaseAll());
}
@Test
public void testReservedUnskippableChunkTypeCausesError() {
final ByteBuf in = Unpooled.wrappedBuffer(new byte[] {
0x03, 0x01, 0x00, 0x00, 0x00
});
assertThrows(DecompressionException.class, new Executable() {
@Override
public void execute() {
channel.writeInbound(in);
}
});
}
@Test
public void testInvalidStreamIdentifierLength() {
final ByteBuf in = Unpooled.wrappedBuffer(new byte[] {
-0x80, 0x05, 0x00, 0x00, 'n', 'e', 't', 't', 'y'
});
assertThrows(DecompressionException.class, new Executable() {
@Override
public void execute() {
channel.writeInbound(in);
}
});
}
@Test
public void testInvalidStreamIdentifierValue() {
final ByteBuf in = Unpooled.wrappedBuffer(new byte[] {
(byte) 0xff, 0x06, 0x00, 0x00, 's', 'n', 'e', 't', 't', 'y'
});
assertThrows(DecompressionException.class, new Executable() {
@Override
public void execute() {
channel.writeInbound(in);
}
});
}
@Test
public void testReservedSkippableBeforeStreamIdentifier() {
final ByteBuf in = Unpooled.wrappedBuffer(new byte[] {
-0x7f, 0x06, 0x00, 0x00, 's', 'n', 'e', 't', 't', 'y'
});
assertThrows(DecompressionException.class, new Executable() {
@Override
public void execute() {
channel.writeInbound(in);
}
});
}
@Test
public void testUncompressedDataBeforeStreamIdentifier() {
final ByteBuf in = Unpooled.wrappedBuffer(new byte[] {
0x01, 0x05, 0x00, 0x00, 'n', 'e', 't', 't', 'y'
});
assertThrows(DecompressionException.class, new Executable() {
@Override
public void execute() throws Throwable {
channel.writeInbound(in);
}
});
Defined In
Source
Frequently Asked Questions
What is the SnappyFrameDecoderTest class?
SnappyFrameDecoderTest is a class in the netty codebase, defined in codec-compression/src/test/java/io/netty/handler/codec/compression/SnappyFrameDecoderTest.java.
Where is SnappyFrameDecoderTest defined?
SnappyFrameDecoderTest is defined in codec-compression/src/test/java/io/netty/handler/codec/compression/SnappyFrameDecoderTest.java at line 32.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free