testEndOfInputWhenChannelIsClosedwhenWrite() — netty Function Reference
Architecture documentation for the testEndOfInputWhenChannelIsClosedwhenWrite() function in ChunkedWriteHandlerTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 21afbd4b_c6ea_71c1_1062_f2829f2dce30["testEndOfInputWhenChannelIsClosedwhenWrite()"] 56a5cec9_e7c0_8a2d_a9b0_56df2226f2bb["ChunkedWriteHandlerTest"] 21afbd4b_c6ea_71c1_1062_f2829f2dce30 -->|defined in| 56a5cec9_e7c0_8a2d_a9b0_56df2226f2bb a3ae28ff_0e32_363b_e2ed_3dd7d96e444d["isEndOfInput()"] 21afbd4b_c6ea_71c1_1062_f2829f2dce30 -->|calls| a3ae28ff_0e32_363b_e2ed_3dd7d96e444d 5b3c7cbd_194c_150b_fe10_1fdfe7748566["close()"] 21afbd4b_c6ea_71c1_1062_f2829f2dce30 -->|calls| 5b3c7cbd_194c_150b_fe10_1fdfe7748566 065d12a2_1432_c5fd_404a_8b3282ea3171["length()"] 21afbd4b_c6ea_71c1_1062_f2829f2dce30 -->|calls| 065d12a2_1432_c5fd_404a_8b3282ea3171 a977f573_a177_e786_c51c_5e5a05d2b25e["progress()"] 21afbd4b_c6ea_71c1_1062_f2829f2dce30 -->|calls| a977f573_a177_e786_c51c_5e5a05d2b25e style 21afbd4b_c6ea_71c1_1062_f2829f2dce30 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/test/java/io/netty/handler/stream/ChunkedWriteHandlerTest.java lines 574–621
@Test
public void testEndOfInputWhenChannelIsClosedwhenWrite() {
ChunkedInput<ByteBuf> input = new ChunkedInput<ByteBuf>() {
@Override
public boolean isEndOfInput() {
return true;
}
@Override
public void close() {
}
@Deprecated
@Override
public ByteBuf readChunk(ChannelHandlerContext ctx) {
return null;
}
@Override
public ByteBuf readChunk(ByteBufAllocator allocator) {
return null;
}
@Override
public long length() {
return -1;
}
@Override
public long progress() {
return 1;
}
};
EmbeddedChannel ch = new EmbeddedChannel(new ChannelOutboundHandlerAdapter() {
@Override
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
ReferenceCountUtil.release(msg);
// Calling close so we will drop all queued messages in the ChunkedWriteHandler.
ctx.close();
promise.setSuccess();
}
}, new ChunkedWriteHandler());
ch.writeAndFlush(input).syncUninterruptibly();
assertFalse(ch.finishAndReleaseAll());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testEndOfInputWhenChannelIsClosedwhenWrite() do?
testEndOfInputWhenChannelIsClosedwhenWrite() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/stream/ChunkedWriteHandlerTest.java.
Where is testEndOfInputWhenChannelIsClosedwhenWrite() defined?
testEndOfInputWhenChannelIsClosedwhenWrite() is defined in handler/src/test/java/io/netty/handler/stream/ChunkedWriteHandlerTest.java at line 574.
What does testEndOfInputWhenChannelIsClosedwhenWrite() call?
testEndOfInputWhenChannelIsClosedwhenWrite() calls 4 function(s): close, isEndOfInput, length, progress.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free