testTerminationFutureSuccessReflectively() — netty Function Reference
Architecture documentation for the testTerminationFutureSuccessReflectively() function in ThreadPerChannelEventLoopGroupTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d4190fb8_00e0_9168_b7ab_f0c14a9af675["testTerminationFutureSuccessReflectively()"] f4567ea2_d860_6e7e_51e1_01e57493fa4f["ThreadPerChannelEventLoopGroupTest"] d4190fb8_00e0_9168_b7ab_f0c14a9af675 -->|defined in| f4567ea2_d860_6e7e_51e1_01e57493fa4f a1cc7dac_2447_0e97_a67a_2b155b9c5c4c["runTest()"] d4190fb8_00e0_9168_b7ab_f0c14a9af675 -->|calls| a1cc7dac_2447_0e97_a67a_2b155b9c5c4c style d4190fb8_00e0_9168_b7ab_f0c14a9af675 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/test/java/io/netty/channel/ThreadPerChannelEventLoopGroupTest.java lines 55–80
@Test
public void testTerminationFutureSuccessReflectively() throws Exception {
Field terminationFutureField =
ThreadPerChannelEventLoopGroup.class.getDeclaredField("terminationFuture");
terminationFutureField.setAccessible(true);
final Exception[] exceptionHolder = new Exception[1];
for (int i = 0; i < 2; i++) {
ThreadPerChannelEventLoopGroup loopGroup = new ThreadPerChannelEventLoopGroup(64);
Promise<?> promise = new DefaultPromise<Void>(GlobalEventExecutor.INSTANCE) {
@Override
public Promise<Void> setSuccess(Void result) {
try {
return super.setSuccess(result);
} catch (IllegalStateException e) {
exceptionHolder[0] = e;
throw e;
}
}
};
terminationFutureField.set(loopGroup, promise);
runTest(loopGroup);
}
// The global event executor will not terminate, but this will give the test a chance to fail.
GlobalEventExecutor.INSTANCE.awaitTermination(100, TimeUnit.MILLISECONDS);
assertNull(exceptionHolder[0]);
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does testTerminationFutureSuccessReflectively() do?
testTerminationFutureSuccessReflectively() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/ThreadPerChannelEventLoopGroupTest.java.
Where is testTerminationFutureSuccessReflectively() defined?
testTerminationFutureSuccessReflectively() is defined in transport/src/test/java/io/netty/channel/ThreadPerChannelEventLoopGroupTest.java at line 55.
What does testTerminationFutureSuccessReflectively() call?
testTerminationFutureSuccessReflectively() calls 1 function(s): runTest.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free