Home / Function/ testReleaseAfterClosePool() — netty Function Reference

testReleaseAfterClosePool() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/pool/FixedChannelPoolTest.java lines 222–250

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

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

        final FixedChannelPool pool = new FixedChannelPool(t.cb, new TestChannelPoolHandler(), 2);
        final Future<Channel> acquire = pool.acquire();
        final Channel channel = acquire.get();
        pool.close();
        group.submit(new Runnable() {
            @Override
            public void run() {
                // NOOP
            }
        }).syncUninterruptibly();
        assertThrows(IllegalStateException.class, new Executable() {
            @Override
            public void execute() throws Throwable {
                pool.release(channel).syncUninterruptibly();
            }
        });
        // Since the pool is closed, the Channel should have been closed as well.
        channel.closeFuture().syncUninterruptibly();
        assertFalse(channel.isOpen());
        sc.close().syncUninterruptibly();
        pool.close();
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free