Home / Function/ testHandlerAddedExecutedInEventLoop() — netty Function Reference

testHandlerAddedExecutedInEventLoop() — netty Function Reference

Architecture documentation for the testHandlerAddedExecutedInEventLoop() function in EmbeddedChannelTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  7bbf4d9e_77ed_eec0_a4a5_3a044085a658["testHandlerAddedExecutedInEventLoop()"]
  300cabef_b042_697f_5623_37ce249f504d["EmbeddedChannelTest"]
  7bbf4d9e_77ed_eec0_a4a5_3a044085a658 -->|defined in| 300cabef_b042_697f_5623_37ce249f504d
  style 7bbf4d9e_77ed_eec0_a4a5_3a044085a658 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/embedded/EmbeddedChannelTest.java lines 160–184

    @Test
    @Timeout(value = 3000, unit = TimeUnit.MILLISECONDS)
    public void testHandlerAddedExecutedInEventLoop() throws Throwable {
        final CountDownLatch latch = new CountDownLatch(1);
        final AtomicReference<Throwable> error = new AtomicReference<Throwable>();
        final ChannelHandler handler = new ChannelHandlerAdapter() {
            @Override
            public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
                try {
                    assertTrue(ctx.executor().inEventLoop());
                } catch (Throwable cause) {
                    error.set(cause);
                } finally {
                    latch.countDown();
                }
            }
        };
        EmbeddedChannel channel = new EmbeddedChannel(handler);
        assertFalse(channel.finish());
        latch.await();
        Throwable cause = error.get();
        if (cause != null) {
            throw cause;
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testHandlerAddedExecutedInEventLoop() do?
testHandlerAddedExecutedInEventLoop() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/embedded/EmbeddedChannelTest.java.
Where is testHandlerAddedExecutedInEventLoop() defined?
testHandlerAddedExecutedInEventLoop() is defined in transport/src/test/java/io/netty/channel/embedded/EmbeddedChannelTest.java at line 160.

Analyze Your Own Codebase

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

Try Supermodel Free