testRemoveAndWriteAllWithVoidPromise() — netty Function Reference
Architecture documentation for the testRemoveAndWriteAllWithVoidPromise() function in PendingWriteQueueTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD f36830e1_bcb2_871a_c18b_a197da46a0bf["testRemoveAndWriteAllWithVoidPromise()"] b4bff24e_be13_7693_4ece_a0ed5ee1a982["PendingWriteQueueTest"] f36830e1_bcb2_871a_c18b_a197da46a0bf -->|defined in| b4bff24e_be13_7693_4ece_a0ed5ee1a982 21f29e3d_6bf2_8663_b27c_0cf9f480f48f["EmbeddedChannel()"] f36830e1_bcb2_871a_c18b_a197da46a0bf -->|calls| 21f29e3d_6bf2_8663_b27c_0cf9f480f48f c0e66cf8_7fea_5c09_425e_7b33398c45e6["write()"] f36830e1_bcb2_871a_c18b_a197da46a0bf -->|calls| c0e66cf8_7fea_5c09_425e_7b33398c45e6 style f36830e1_bcb2_871a_c18b_a197da46a0bf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/test/java/io/netty/channel/PendingWriteQueueTest.java lines 253–275
@Test
public void testRemoveAndWriteAllWithVoidPromise() {
EmbeddedChannel channel = new EmbeddedChannel(new ChannelOutboundHandlerAdapter() {
@Override
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) {
// Convert to writeAndFlush(...) so the promise will be notified by the transport.
ctx.writeAndFlush(msg, promise);
}
}, new ChannelOutboundHandlerAdapter());
final PendingWriteQueue queue = new PendingWriteQueue(channel.pipeline().lastContext());
ChannelPromise promise = channel.newPromise();
queue.add(1L, promise);
queue.add(2L, channel.voidPromise());
queue.removeAndWriteAll();
assertTrue(channel.finish());
assertTrue(promise.isDone());
assertTrue(promise.isSuccess());
assertEquals(1L, (Long) channel.readOutbound());
assertEquals(2L, (Long) channel.readOutbound());
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does testRemoveAndWriteAllWithVoidPromise() do?
testRemoveAndWriteAllWithVoidPromise() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/PendingWriteQueueTest.java.
Where is testRemoveAndWriteAllWithVoidPromise() defined?
testRemoveAndWriteAllWithVoidPromise() is defined in transport/src/test/java/io/netty/channel/PendingWriteQueueTest.java at line 253.
What does testRemoveAndWriteAllWithVoidPromise() call?
testRemoveAndWriteAllWithVoidPromise() calls 2 function(s): EmbeddedChannel, write.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free