headersWriteShouldHalfCloseAfterOnErrorForImplicitlyCreatedStream() — netty Function Reference
Architecture documentation for the headersWriteShouldHalfCloseAfterOnErrorForImplicitlyCreatedStream() function in DefaultHttp2ConnectionEncoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD e4c2fd7a_56b1_a40f_08e3_10cfe8470068["headersWriteShouldHalfCloseAfterOnErrorForImplicitlyCreatedStream()"] aef19477_9a1f_48c4_824a_17c7f3ecbb10["DefaultHttp2ConnectionEncoderTest"] e4c2fd7a_56b1_a40f_08e3_10cfe8470068 -->|defined in| aef19477_9a1f_48c4_824a_17c7f3ecbb10 28f0aa39_bbbc_f7c5_14c5_1a7106a5f5a4["writeAllFlowControlledFrames()"] e4c2fd7a_56b1_a40f_08e3_10cfe8470068 -->|calls| 28f0aa39_bbbc_f7c5_14c5_1a7106a5f5a4 style e4c2fd7a_56b1_a40f_08e3_10cfe8470068 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionEncoderTest.java lines 794–817
@Test
public void headersWriteShouldHalfCloseAfterOnErrorForImplicitlyCreatedStream() throws Exception {
final ChannelPromise promise = newPromise();
final Throwable ex = new RuntimeException();
// Fake an encoding error, like HPACK's HeaderListSizeException
when(writer.writeHeaders(eq(ctx), eq(STREAM_ID), eq(EmptyHttp2Headers.INSTANCE), eq(0), eq(true), eq(promise)))
.thenAnswer(new Answer<ChannelFuture>() {
@Override
public ChannelFuture answer(InvocationOnMock invocation) {
promise.setFailure(ex);
return promise;
}
});
writeAllFlowControlledFrames();
encoder.writeHeaders(ctx, STREAM_ID, EmptyHttp2Headers.INSTANCE, 0, true, promise);
assertTrue(promise.isDone());
assertFalse(promise.isSuccess());
assertFalse(stream(STREAM_ID).isHeadersSent());
InOrder inOrder = inOrder(lifecycleManager);
inOrder.verify(lifecycleManager).onError(eq(ctx), eq(true), eq(ex));
inOrder.verify(lifecycleManager).closeStreamLocal(eq(stream(STREAM_ID)), eq(promise));
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does headersWriteShouldHalfCloseAfterOnErrorForImplicitlyCreatedStream() do?
headersWriteShouldHalfCloseAfterOnErrorForImplicitlyCreatedStream() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionEncoderTest.java.
Where is headersWriteShouldHalfCloseAfterOnErrorForImplicitlyCreatedStream() defined?
headersWriteShouldHalfCloseAfterOnErrorForImplicitlyCreatedStream() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionEncoderTest.java at line 794.
What does headersWriteShouldHalfCloseAfterOnErrorForImplicitlyCreatedStream() call?
headersWriteShouldHalfCloseAfterOnErrorForImplicitlyCreatedStream() calls 1 function(s): writeAllFlowControlledFrames.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free