Home / Function/ testChannelsRegistered() — netty Function Reference

testChannelsRegistered() — netty Function Reference

Architecture documentation for the testChannelsRegistered() function in AbstractSingleThreadEventLoopTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  52462c2e_4250_f1ae_61ef_3b822985a83b["testChannelsRegistered()"]
  eb487d77_b896_e5c3_20f1_2b7144dc7cf5["AbstractSingleThreadEventLoopTest"]
  52462c2e_4250_f1ae_61ef_3b822985a83b -->|defined in| eb487d77_b896_e5c3_20f1_2b7144dc7cf5
  8e4c2417_e591_227d_d30d_62c23430fd6d["registeredChannels()"]
  52462c2e_4250_f1ae_61ef_3b822985a83b -->|calls| 8e4c2417_e591_227d_d30d_62c23430fd6d
  d3288ff6_2cfa_b5ba_fcb4_f110c904eaec["checkNumRegisteredChannels()"]
  52462c2e_4250_f1ae_61ef_3b822985a83b -->|calls| d3288ff6_2cfa_b5ba_fcb4_f110c904eaec
  style 52462c2e_4250_f1ae_61ef_3b822985a83b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

testsuite/src/main/java/io/netty/testsuite/transport/AbstractSingleThreadEventLoopTest.java lines 74–104

    @Test
    @Timeout(value = 5000, unit = TimeUnit.MILLISECONDS)
    public void testChannelsRegistered() throws Exception {
        EventLoopGroup group = newEventLoopGroup();
        final SingleThreadEventLoop loop = (SingleThreadEventLoop) group.next();

        try {
            final Channel ch1 = newChannel();
            final Channel ch2 = newChannel();

            int rc = registeredChannels(loop);
            boolean channelCountSupported = rc != -1;

            if (channelCountSupported) {
                assertEquals(0, registeredChannels(loop));
            }

            assertTrue(loop.register(ch1).syncUninterruptibly().isSuccess());
            assertTrue(loop.register(ch2).syncUninterruptibly().isSuccess());
            if (channelCountSupported) {
                checkNumRegisteredChannels(loop, 2);
            }

            assertTrue(ch1.deregister().syncUninterruptibly().isSuccess());
            if (channelCountSupported) {
                checkNumRegisteredChannels(loop, 1);
            }
        } finally {
            group.shutdownGracefully();
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testChannelsRegistered() do?
testChannelsRegistered() is a function in the netty codebase, defined in testsuite/src/main/java/io/netty/testsuite/transport/AbstractSingleThreadEventLoopTest.java.
Where is testChannelsRegistered() defined?
testChannelsRegistered() is defined in testsuite/src/main/java/io/netty/testsuite/transport/AbstractSingleThreadEventLoopTest.java at line 74.
What does testChannelsRegistered() call?
testChannelsRegistered() calls 2 function(s): checkNumRegisteredChannels, registeredChannels.

Analyze Your Own Codebase

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

Try Supermodel Free