testAutoReadingOn() — netty Function Reference
Architecture documentation for the testAutoReadingOn() function in FlowControlHandlerTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d7863a23_034b_06f5_f7db_9cc2940f46f4["testAutoReadingOn()"] 403e241f_d76e_484e_d952_7f7a46681916["FlowControlHandlerTest"] d7863a23_034b_06f5_f7db_9cc2940f46f4 -->|defined in| 403e241f_d76e_484e_d952_7f7a46681916 style d7863a23_034b_06f5_f7db_9cc2940f46f4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/test/java/io/netty/handler/flow/FlowControlHandlerTest.java lines 129–159
@Test
public void testAutoReadingOn() throws Exception {
final CountDownLatch latch = new CountDownLatch(3);
ChannelInboundHandlerAdapter handler = new ChannelInboundHandlerAdapter() {
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) {
ReferenceCountUtil.release(msg);
// We're turning off auto reading in the hope that no
// new messages are being sent but that is not true.
ctx.channel().config().setAutoRead(false);
latch.countDown();
}
};
Channel server = newServer(true, handler);
Channel client = newClient(server.localAddress());
try {
client.writeAndFlush(newOneMessage())
.syncUninterruptibly();
// We received three messages even through auto reading
// was turned off after we received the first message.
assertTrue(latch.await(1L, SECONDS));
} finally {
client.close();
server.close();
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testAutoReadingOn() do?
testAutoReadingOn() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/flow/FlowControlHandlerTest.java.
Where is testAutoReadingOn() defined?
testAutoReadingOn() is defined in handler/src/test/java/io/netty/handler/flow/FlowControlHandlerTest.java at line 129.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free