testInitChannelThrows() — netty Function Reference
Architecture documentation for the testInitChannelThrows() function in ChannelInitializerTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD c492b1c1_f6d3_2090_6fd0_181783165065["testInitChannelThrows()"] 1d273673_4ec9_d923_c0aa_b8258d9bebe4["ChannelInitializerTest"] c492b1c1_f6d3_2090_6fd0_181783165065 -->|defined in| 1d273673_4ec9_d923_c0aa_b8258d9bebe4 3c8bc239_f2e4_ad3b_5c28_37b0e0deb19f["testInitChannelThrowsRegisterFirst()"] 3c8bc239_f2e4_ad3b_5c28_37b0e0deb19f -->|calls| c492b1c1_f6d3_2090_6fd0_181783165065 562eaef8_dcc4_7af8_71b3_ef17b555d753["testInitChannelThrowsRegisterAfter()"] 562eaef8_dcc4_7af8_71b3_ef17b555d753 -->|calls| c492b1c1_f6d3_2090_6fd0_181783165065 style c492b1c1_f6d3_2090_6fd0_181783165065 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/test/java/io/netty/channel/ChannelInitializerTest.java lines 86–115
private void testInitChannelThrows(boolean registerFirst) {
final Exception exception = new Exception();
final AtomicReference<Throwable> causeRef = new AtomicReference<Throwable>();
ChannelPipeline pipeline = new LocalChannel().pipeline();
if (registerFirst) {
group.register(pipeline.channel()).syncUninterruptibly();
}
pipeline.addFirst(new ChannelInitializer<Channel>() {
@Override
protected void initChannel(Channel ch) throws Exception {
throw exception;
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
causeRef.set(cause);
super.exceptionCaught(ctx, cause);
}
});
if (!registerFirst) {
group.register(pipeline.channel()).syncUninterruptibly();
}
pipeline.channel().close().syncUninterruptibly();
pipeline.channel().closeFuture().syncUninterruptibly();
assertSame(exception, causeRef.get());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testInitChannelThrows() do?
testInitChannelThrows() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/ChannelInitializerTest.java.
Where is testInitChannelThrows() defined?
testInitChannelThrows() is defined in transport/src/test/java/io/netty/channel/ChannelInitializerTest.java at line 86.
What calls testInitChannelThrows()?
testInitChannelThrows() is called by 2 function(s): testInitChannelThrowsRegisterAfter, testInitChannelThrowsRegisterFirst.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free