testAllocatingAroundBlockSize() — netty Function Reference
Architecture documentation for the testAllocatingAroundBlockSize() function in Lz4FrameEncoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD c572c687_c6c6_1cb6_34b9_7036673c2154["testAllocatingAroundBlockSize()"] 16452743_407c_c5f6_ee9f_baa8b84020f0["Lz4FrameEncoderTest"] c572c687_c6c6_1cb6_34b9_7036673c2154 -->|defined in| 16452743_407c_c5f6_ee9f_baa8b84020f0 b40abe87_4a28_e9da_fe39_82d9b1130383["EmbeddedChannel()"] c572c687_c6c6_1cb6_34b9_7036673c2154 -->|calls| b40abe87_4a28_e9da_fe39_82d9b1130383 style c572c687_c6c6_1cb6_34b9_7036673c2154 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-compression/src/test/java/io/netty/handler/codec/compression/Lz4FrameEncoderTest.java lines 216–240
@Test
public void testAllocatingAroundBlockSize() {
int blockSize = 100;
Lz4FrameEncoder encoder = newEncoder(blockSize, Lz4FrameEncoder.DEFAULT_MAX_ENCODE_SIZE);
EmbeddedChannel channel = new EmbeddedChannel(encoder);
int size = blockSize - 1;
ByteBuf buf = ByteBufAllocator.DEFAULT.buffer(size, size);
buf.writerIndex(size);
assertEquals(0, encoder.getBackingBuffer().readableBytes());
channel.write(buf);
assertEquals(size, encoder.getBackingBuffer().readableBytes());
int nextSize = size - 1;
buf = ByteBufAllocator.DEFAULT.buffer(nextSize, nextSize);
buf.writerIndex(nextSize);
channel.write(buf);
assertEquals(size + nextSize - blockSize, encoder.getBackingBuffer().readableBytes());
channel.flush();
assertEquals(0, encoder.getBackingBuffer().readableBytes());
assertTrue(channel.finish());
assertTrue(channel.releaseOutbound());
assertFalse(channel.releaseInbound());
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does testAllocatingAroundBlockSize() do?
testAllocatingAroundBlockSize() is a function in the netty codebase, defined in codec-compression/src/test/java/io/netty/handler/codec/compression/Lz4FrameEncoderTest.java.
Where is testAllocatingAroundBlockSize() defined?
testAllocatingAroundBlockSize() is defined in codec-compression/src/test/java/io/netty/handler/codec/compression/Lz4FrameEncoderTest.java at line 216.
What does testAllocatingAroundBlockSize() call?
testAllocatingAroundBlockSize() calls 1 function(s): EmbeddedChannel.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free