testGracefulShutdownTimeout() — netty Function Reference
Architecture documentation for the testGracefulShutdownTimeout() function in SingleThreadEventLoopTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 37404233_c323_be30_dabb_5c54281db5a6["testGracefulShutdownTimeout()"] 42a05bb6_77d1_5163_f1de_dc06e1ae82b0["SingleThreadEventLoopTest"] 37404233_c323_be30_dabb_5c54281db5a6 -->|defined in| 42a05bb6_77d1_5163_f1de_dc06e1ae82b0 style 37404233_c323_be30_dabb_5c54281db5a6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/test/java/io/netty/channel/SingleThreadEventLoopTest.java lines 459–482
@Test
@Timeout(value = 5000, unit = TimeUnit.MILLISECONDS)
public void testGracefulShutdownTimeout() throws Exception {
loopA.shutdownGracefully(2, 2, TimeUnit.SECONDS);
// Keep Scheduling tasks for another 3 seconds.
// Submitted tasks must be rejected after 2 second timeout.
for (int i = 0; i < 10; i ++) {
Thread.sleep(100);
loopA.execute(NOOP);
}
try {
for (int i = 0; i < 20; i ++) {
Thread.sleep(100);
loopA.execute(NOOP);
}
fail("shutdownGracefully() must reject a task after timeout.");
} catch (RejectedExecutionException e) {
// Expected
}
assertTrue(loopA.isShuttingDown());
assertTrue(loopA.isShutdown());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testGracefulShutdownTimeout() do?
testGracefulShutdownTimeout() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/SingleThreadEventLoopTest.java.
Where is testGracefulShutdownTimeout() defined?
testGracefulShutdownTimeout() is defined in transport/src/test/java/io/netty/channel/SingleThreadEventLoopTest.java at line 459.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free