testUnexpectRead() — netty Function Reference
Architecture documentation for the testUnexpectRead() function in ByteToMessageDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 972008e6_186e_aef9_8e17_0cd0f52093cc["testUnexpectRead()"] b1c999fe_35fb_8b70_a958_296cffb0616a["ByteToMessageDecoderTest"] 972008e6_186e_aef9_8e17_0cd0f52093cc -->|defined in| b1c999fe_35fb_8b70_a958_296cffb0616a 5082856a_b229_862d_0072_81f9b24f56a3["EmbeddedChannel()"] 972008e6_186e_aef9_8e17_0cd0f52093cc -->|calls| 5082856a_b229_862d_0072_81f9b24f56a3 style 972008e6_186e_aef9_8e17_0cd0f52093cc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-base/src/test/java/io/netty/handler/codec/ByteToMessageDecoderTest.java lines 577–596
@Test
void testUnexpectRead() {
EmbeddedChannel channel = new EmbeddedChannel();
channel.config().setAutoRead(false);
ReadInterceptingHandler interceptor = new ReadInterceptingHandler();
channel.pipeline().addLast(
interceptor,
new SimpleChannelInboundHandler<ByteBuf>() {
@Override
protected void channelRead0(ChannelHandlerContext ctx, ByteBuf msg) throws Exception {
ctx.pipeline().replace(this, "fix", new FixedLengthFrameDecoder(3));
}
}
);
assertFalse(channel.writeInbound(Unpooled.wrappedBuffer(new byte[]{1})));
assertEquals(0, interceptor.readsTriggered);
assertNotNull(channel.pipeline().get(FixedLengthFrameDecoder.class));
assertFalse(channel.finish());
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does testUnexpectRead() do?
testUnexpectRead() is a function in the netty codebase, defined in codec-base/src/test/java/io/netty/handler/codec/ByteToMessageDecoderTest.java.
Where is testUnexpectRead() defined?
testUnexpectRead() is defined in codec-base/src/test/java/io/netty/handler/codec/ByteToMessageDecoderTest.java at line 577.
What does testUnexpectRead() call?
testUnexpectRead() 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