testFlushViaScheduledTask() — netty Function Reference
Architecture documentation for the testFlushViaScheduledTask() function in FlushConsolidationHandlerTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD fd0495b5_137d_6572_7555_696ba8028310["testFlushViaScheduledTask()"] 4ef52a0d_d145_a738_5ebe_4e1ee02cb2ca["FlushConsolidationHandlerTest"] fd0495b5_137d_6572_7555_696ba8028310 -->|defined in| 4ef52a0d_d145_a738_5ebe_4e1ee02cb2ca style fd0495b5_137d_6572_7555_696ba8028310 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/test/java/io/netty/handler/flush/FlushConsolidationHandlerTest.java lines 36–50
@Test
public void testFlushViaScheduledTask() {
final AtomicInteger flushCount = new AtomicInteger();
EmbeddedChannel channel = newChannel(flushCount, true);
// Flushes should not go through immediately, as they're scheduled as an async task
// To ensure we not run the async task directly we will call trigger the flush() via the pipeline.
channel.pipeline().flush();
assertEquals(0, flushCount.get());
channel.pipeline().flush();
assertEquals(0, flushCount.get());
// Trigger the execution of the async task
channel.runPendingTasks();
assertEquals(1, flushCount.get());
assertFalse(channel.finish());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testFlushViaScheduledTask() do?
testFlushViaScheduledTask() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/flush/FlushConsolidationHandlerTest.java.
Where is testFlushViaScheduledTask() defined?
testFlushViaScheduledTask() is defined in handler/src/test/java/io/netty/handler/flush/FlushConsolidationHandlerTest.java at line 36.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free