Home / Function/ testAcquireNewConnectionWhen() — netty Function Reference

testAcquireNewConnectionWhen() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/pool/FixedChannelPoolTest.java lines 154–172

    @Test
    public void testAcquireNewConnectionWhen() throws Exception {
        Tuple t = bootstrap();

        // Start server
        Channel sc = t.sb.bind(t.address).syncUninterruptibly().channel();
        ChannelPoolHandler handler = new TestChannelPoolHandler();
        ChannelPool pool = new FixedChannelPool(t.cb, handler, 1);
        Channel channel1 = pool.acquire().syncUninterruptibly().getNow();
        channel1.close().syncUninterruptibly();
        pool.release(channel1);

        Channel channel2 = pool.acquire().syncUninterruptibly().getNow();

        assertNotSame(channel1, channel2);
        sc.close().syncUninterruptibly();
        channel2.close().syncUninterruptibly();
        pool.close();
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free