testChannelReleaseHealthCheck() — netty Function Reference
Architecture documentation for the testChannelReleaseHealthCheck() function in FixedChannelPoolTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 95b63676_109d_3eed_6a7e_5916c661a27e["testChannelReleaseHealthCheck()"] 92761f16_3144_6791_29c9_00f65a091a8f["FixedChannelPoolTest"] 95b63676_109d_3eed_6a7e_5916c661a27e -->|defined in| 92761f16_3144_6791_29c9_00f65a091a8f 2caaef8c_d64c_2a83_bfab_fbaf66b32ffa["InnerFixedChannelPool()"] 95b63676_109d_3eed_6a7e_5916c661a27e -->|calls| 2caaef8c_d64c_2a83_bfab_fbaf66b32ffa style 95b63676_109d_3eed_6a7e_5916c661a27e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/test/java/io/netty/channel/pool/FixedChannelPoolTest.java lines 318–364
@Test
public void testChannelReleaseHealthCheck() {
Tuple t = bootstrap();
// Start server
Channel sc = t.sb.bind(t.address).syncUninterruptibly().channel();
ChannelPoolHandler handler = new TestChannelPoolHandler();
InnerFixedChannelPool pool = new InnerFixedChannelPool(t.cb, handler, ChannelHealthChecker.ACTIVE,
AcquireTimeoutAction.NEW, 500, 1, Integer.MAX_VALUE, true);
// releaseHealthCheck=true,channel=open,doHealthCheckOnRelease
Channel channel = pool.acquire().syncUninterruptibly().getNow();
pool.release(channel).syncUninterruptibly().getNow();
Channel sameChannel = pool.acquire().syncUninterruptibly().getNow();
assertSame(sameChannel, channel);
// releaseHealthCheck=true,channel=close,doHealthCheckOnRelease
sameChannel.close().syncUninterruptibly();
pool.release(channel).syncUninterruptibly().getNow();
sameChannel = pool.acquire().syncUninterruptibly().getNow();
assertNotSame(sameChannel, channel);
// close all and create a new poll
sameChannel.close().syncUninterruptibly();
channel.close().syncUninterruptibly();
pool.close();
pool = new InnerFixedChannelPool(t.cb, handler, ChannelHealthChecker.ACTIVE,
AcquireTimeoutAction.NEW, 500, 1, Integer.MAX_VALUE, false);
// releaseHealthCheck=false,channel=open,releaseAndOffer
channel = pool.acquire().syncUninterruptibly().getNow();
pool.release(channel).syncUninterruptibly().getNow();
sameChannel = pool.acquire().syncUninterruptibly().getNow();
assertSame(sameChannel, channel);
// releaseHealthCheck=false,channel=close,releaseAndOffer
sameChannel.close().syncUninterruptibly();
pool.release(channel).syncUninterruptibly().getNow();
// the acquire will do a heath check.. this is why we call the special method
sameChannel = pool.pollChannel();
assertSame(sameChannel, channel);
sc.close().syncUninterruptibly();
sameChannel.close().syncUninterruptibly();
channel.close().syncUninterruptibly();
pool.close();
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does testChannelReleaseHealthCheck() do?
testChannelReleaseHealthCheck() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/pool/FixedChannelPoolTest.java.
Where is testChannelReleaseHealthCheck() defined?
testChannelReleaseHealthCheck() is defined in transport/src/test/java/io/netty/channel/pool/FixedChannelPoolTest.java at line 318.
What does testChannelReleaseHealthCheck() call?
testChannelReleaseHealthCheck() calls 1 function(s): InnerFixedChannelPool.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free