Home / Function/ testCloseAsync() — netty Function Reference

testCloseAsync() — netty Function Reference

Architecture documentation for the testCloseAsync() function in FixedChannelPoolTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  d0a16da7_afe7_d156_2605_c6ea99ba11b8["testCloseAsync()"]
  92761f16_3144_6791_29c9_00f65a091a8f["FixedChannelPoolTest"]
  d0a16da7_afe7_d156_2605_c6ea99ba11b8 -->|defined in| 92761f16_3144_6791_29c9_00f65a091a8f
  style d0a16da7_afe7_d156_2605_c6ea99ba11b8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/pool/FixedChannelPoolTest.java lines 268–286

    @Test
    public void testCloseAsync() throws ExecutionException, InterruptedException {
        Tuple t = bootstrap();

        // Start server
        final Channel sc = t.sb.bind(t.address).syncUninterruptibly().channel();

        final FixedChannelPool pool = new FixedChannelPool(t.cb, new TestChannelPoolHandler(), 2);

        pool.acquire().get();
        pool.acquire().get();

        final ChannelPromise closePromise = sc.newPromise();
        pool.closeAsync().addListener(future -> {
            assertEquals(0, pool.acquiredChannelCount());
            sc.close(closePromise).syncUninterruptibly();
        }).awaitUninterruptibly();
        closePromise.awaitUninterruptibly();
    }

Domain

Subdomains

Frequently Asked Questions

What does testCloseAsync() do?
testCloseAsync() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/pool/FixedChannelPoolTest.java.
Where is testCloseAsync() defined?
testCloseAsync() is defined in transport/src/test/java/io/netty/channel/pool/FixedChannelPoolTest.java at line 268.

Analyze Your Own Codebase

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

Try Supermodel Free