outboundStreamShouldNotWriteResetFrameOnClose_IfStreamDidntExist() — netty Function Reference
Architecture documentation for the outboundStreamShouldNotWriteResetFrameOnClose_IfStreamDidntExist() function in Http2MultiplexTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d55be1f6_4b59_8eee_d853_19ea318c990c["outboundStreamShouldNotWriteResetFrameOnClose_IfStreamDidntExist()"] 4745ff96_ed57_3bd8_9861_4b786d0b6e09["Http2MultiplexTest"] d55be1f6_4b59_8eee_d853_19ea318c990c -->|defined in| 4745ff96_ed57_3bd8_9861_4b786d0b6e09 22928953_49fc_cbc5_c75c_f236ce1e1fc7["eqStreamId()"] d55be1f6_4b59_8eee_d853_19ea318c990c -->|calls| 22928953_49fc_cbc5_c75c_f236ce1e1fc7 style d55be1f6_4b59_8eee_d853_19ea318c990c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java lines 805–841
@Test
public void outboundStreamShouldNotWriteResetFrameOnClose_IfStreamDidntExist() {
when(frameWriter.writeHeaders(eqCodecCtx(), anyInt(),
any(Http2Headers.class), anyInt(), anyBoolean(),
any(ChannelPromise.class))).thenAnswer(new Answer<ChannelFuture>() {
private boolean headersWritten;
@Override
public ChannelFuture answer(InvocationOnMock invocationOnMock) {
// We want to fail to write the first headers frame. This is what happens if the connection
// refuses to allocate a new stream due to having received a GOAWAY.
if (!headersWritten) {
headersWritten = true;
return ((ChannelPromise) invocationOnMock.getArgument(5)).setFailure(new Exception("boom"));
}
return ((ChannelPromise) invocationOnMock.getArgument(5)).setSuccess();
}
});
Http2StreamChannel childChannel = newOutboundStream(new ChannelInboundHandlerAdapter() {
@Override
public void channelActive(ChannelHandlerContext ctx) {
ctx.writeAndFlush(new DefaultHttp2HeadersFrame(new DefaultHttp2Headers()));
ctx.fireChannelActive();
}
});
assertFalse(childChannel.isActive());
childChannel.close();
parentChannel.runPendingTasks();
// The channel was never active so we should not generate a RST frame.
verify(frameWriter, never()).writeRstStream(eqCodecCtx(), eqStreamId(childChannel), anyLong(),
anyChannelPromise());
assertTrue(parentChannel.outboundMessages().isEmpty());
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does outboundStreamShouldNotWriteResetFrameOnClose_IfStreamDidntExist() do?
outboundStreamShouldNotWriteResetFrameOnClose_IfStreamDidntExist() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java.
Where is outboundStreamShouldNotWriteResetFrameOnClose_IfStreamDidntExist() defined?
outboundStreamShouldNotWriteResetFrameOnClose_IfStreamDidntExist() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java at line 805.
What does outboundStreamShouldNotWriteResetFrameOnClose_IfStreamDidntExist() call?
outboundStreamShouldNotWriteResetFrameOnClose_IfStreamDidntExist() calls 1 function(s): eqStreamId.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free