testAutoScalingEventLoopGroupCanScaleDownAndBeUsed() — netty Function Reference
Architecture documentation for the testAutoScalingEventLoopGroupCanScaleDownAndBeUsed() function in AbstractSingleThreadEventLoopTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD fa9c03dd_2805_1c69_4551_e646750ea727["testAutoScalingEventLoopGroupCanScaleDownAndBeUsed()"] eb487d77_b896_e5c3_20f1_2b7144dc7cf5["AbstractSingleThreadEventLoopTest"] fa9c03dd_2805_1c69_4551_e646750ea727 -->|defined in| eb487d77_b896_e5c3_20f1_2b7144dc7cf5 a63bc263_a646_b09f_b2cc_5f65bb9ee306["startAllExecutors()"] fa9c03dd_2805_1c69_4551_e646750ea727 -->|calls| a63bc263_a646_b09f_b2cc_5f65bb9ee306 8296623e_3a87_dc79_c117_7521904ea268["countActiveExecutors()"] fa9c03dd_2805_1c69_4551_e646750ea727 -->|calls| 8296623e_3a87_dc79_c117_7521904ea268 style fa9c03dd_2805_1c69_4551_e646750ea727 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
testsuite/src/main/java/io/netty/testsuite/transport/AbstractSingleThreadEventLoopTest.java lines 323–345
@Test
@Timeout(30)
public void testAutoScalingEventLoopGroupCanScaleDownAndBeUsed() throws Exception {
EventLoopGroup group = newAutoScalingEventLoopGroup();
if (group == null) {
return;
}
try {
startAllExecutors(group);
assertEquals(SCALING_MAX_THREADS, countActiveExecutors(group),
"Group should start with max threads active.");
long deadline = System.nanoTime() + TimeUnit.SECONDS.toNanos(5);
while (countActiveExecutors(group) > SCALING_MIN_THREADS && System.nanoTime() < deadline) {
Thread.sleep(100);
}
assertEquals(SCALING_MIN_THREADS, countActiveExecutors(group),
"Group did not scale down to min threads in time.");
} finally {
group.shutdownGracefully().syncUninterruptibly();
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does testAutoScalingEventLoopGroupCanScaleDownAndBeUsed() do?
testAutoScalingEventLoopGroupCanScaleDownAndBeUsed() is a function in the netty codebase, defined in testsuite/src/main/java/io/netty/testsuite/transport/AbstractSingleThreadEventLoopTest.java.
Where is testAutoScalingEventLoopGroupCanScaleDownAndBeUsed() defined?
testAutoScalingEventLoopGroupCanScaleDownAndBeUsed() is defined in testsuite/src/main/java/io/netty/testsuite/transport/AbstractSingleThreadEventLoopTest.java at line 323.
What does testAutoScalingEventLoopGroupCanScaleDownAndBeUsed() call?
testAutoScalingEventLoopGroupCanScaleDownAndBeUsed() calls 2 function(s): countActiveExecutors, startAllExecutors.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free