Home / Function/ testHandlerAddedExceptionFromChildHandlerIsPropagated() — netty Function Reference

testHandlerAddedExceptionFromChildHandlerIsPropagated() — netty Function Reference

Architecture documentation for the testHandlerAddedExceptionFromChildHandlerIsPropagated() function in DefaultChannelPipelineTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  5348f8ab_29b5_dd67_ce7d_5d76d2910d61["testHandlerAddedExceptionFromChildHandlerIsPropagated()"]
  666d912b_4166_a807_ed10_ba12f328a7b2["DefaultChannelPipelineTest"]
  5348f8ab_29b5_dd67_ce7d_5d76d2910d61 -->|defined in| 666d912b_4166_a807_ed10_ba12f328a7b2
  a2eed25d_b7ba_1436_1910_39c9b1477519["next()"]
  5348f8ab_29b5_dd67_ce7d_5d76d2910d61 -->|calls| a2eed25d_b7ba_1436_1910_39c9b1477519
  0583b801_5c23_7c01_232e_535f987f04c2["CheckExceptionHandler()"]
  5348f8ab_29b5_dd67_ce7d_5d76d2910d61 -->|calls| 0583b801_5c23_7c01_232e_535f987f04c2
  19bd3906_4c8c_ae23_6c05_b7a84d367379["shutdownGracefully()"]
  5348f8ab_29b5_dd67_ce7d_5d76d2910d61 -->|calls| 19bd3906_4c8c_ae23_6c05_b7a84d367379
  style 5348f8ab_29b5_dd67_ce7d_5d76d2910d61 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/DefaultChannelPipelineTest.java lines 1302–1325

    @Test
    @Timeout(value = 3000, unit = TimeUnit.MILLISECONDS)
    public void testHandlerAddedExceptionFromChildHandlerIsPropagated() {
        final EventExecutorGroup group1 = new MultiThreadIoEventLoopGroup(1, LocalIoHandler.newFactory());
        try {
            final Promise<Void> promise = group1.next().newPromise();
            final AtomicBoolean handlerAdded = new AtomicBoolean();
            final Exception exception = new RuntimeException();
            ChannelPipeline pipeline = new LocalChannel().pipeline();
            pipeline.addLast(group1, new CheckExceptionHandler(exception, promise));
            pipeline.addFirst(new ChannelHandlerAdapter() {
                @Override
                public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
                    handlerAdded.set(true);
                    throw exception;
                }
            });
            assertFalse(handlerAdded.get());
            group.register(pipeline.channel());
            promise.syncUninterruptibly();
        } finally {
            group1.shutdownGracefully();
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testHandlerAddedExceptionFromChildHandlerIsPropagated() do?
testHandlerAddedExceptionFromChildHandlerIsPropagated() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/DefaultChannelPipelineTest.java.
Where is testHandlerAddedExceptionFromChildHandlerIsPropagated() defined?
testHandlerAddedExceptionFromChildHandlerIsPropagated() is defined in transport/src/test/java/io/netty/channel/DefaultChannelPipelineTest.java at line 1302.
What does testHandlerAddedExceptionFromChildHandlerIsPropagated() call?
testHandlerAddedExceptionFromChildHandlerIsPropagated() calls 3 function(s): CheckExceptionHandler, next, shutdownGracefully.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free