Home / Function/ testPromiseUseDifferentExecutor() — netty Function Reference

testPromiseUseDifferentExecutor() — netty Function Reference

Architecture documentation for the testPromiseUseDifferentExecutor() function in WriteTimeoutHandlerTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  ff42532f_8c3a_3011_1a53_3bd87656fe05["testPromiseUseDifferentExecutor()"]
  2d2654ec_c4ad_ab49_7241_7291c604482c["WriteTimeoutHandlerTest"]
  ff42532f_8c3a_3011_1a53_3bd87656fe05 -->|defined in| 2d2654ec_c4ad_ab49_7241_7291c604482c
  style ff42532f_8c3a_3011_1a53_3bd87656fe05 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/test/java/io/netty/handler/timeout/WriteTimeoutHandlerTest.java lines 33–60

    @Test
    public void testPromiseUseDifferentExecutor() throws Exception {
        EventExecutorGroup group1 = new DefaultEventExecutorGroup(1);
        EventExecutorGroup group2 = new DefaultEventExecutorGroup(1);
        EmbeddedChannel channel = new EmbeddedChannel(false, false);
        try {
            channel.pipeline().addLast(group1, new WriteTimeoutHandler(10000));
            final CountDownLatch latch = new CountDownLatch(1);
            channel.pipeline().addLast(group2, new ChannelInboundHandlerAdapter() {
                @Override
                public void channelActive(ChannelHandlerContext ctx) throws Exception {
                    ctx.writeAndFlush("something").addListener(new ChannelFutureListener() {
                        @Override
                        public void operationComplete(ChannelFuture future) throws Exception {
                            latch.countDown();
                        }
                    });
                }
            });

            channel.register();
            latch.await();
            assertTrue(channel.finishAndReleaseAll());
        } finally {
            group1.shutdownGracefully();
            group2.shutdownGracefully();
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testPromiseUseDifferentExecutor() do?
testPromiseUseDifferentExecutor() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/timeout/WriteTimeoutHandlerTest.java.
Where is testPromiseUseDifferentExecutor() defined?
testPromiseUseDifferentExecutor() is defined in handler/src/test/java/io/netty/handler/timeout/WriteTimeoutHandlerTest.java at line 33.

Analyze Your Own Codebase

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

Try Supermodel Free