flowControlledWriteAndErrorThrowAnException() — netty Function Reference
Architecture documentation for the flowControlledWriteAndErrorThrowAnException() function in DefaultHttp2RemoteFlowControllerTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 9bf4e446_035a_02cf_567a_f1ff16df2e7e["flowControlledWriteAndErrorThrowAnException()"] f8fd7697_92d4_6455_4dd8_09a33ac81a6f["DefaultHttp2RemoteFlowControllerTest"] 9bf4e446_035a_02cf_567a_f1ff16df2e7e -->|defined in| f8fd7697_92d4_6455_4dd8_09a33ac81a6f 8a4c41bb_e902_5338_7f69_db8f445233a4["mockedFlowControlledThatThrowsOnWrite()"] 9bf4e446_035a_02cf_567a_f1ff16df2e7e -->|calls| 8a4c41bb_e902_5338_7f69_db8f445233a4 46be14d4_2ad4_2dfe_fa3e_2212c0d8e50e["error()"] 9bf4e446_035a_02cf_567a_f1ff16df2e7e -->|calls| 46be14d4_2ad4_2dfe_fa3e_2212c0d8e50e 72f6527f_6737_5bc4_f643_b308fe4de273["window()"] 9bf4e446_035a_02cf_567a_f1ff16df2e7e -->|calls| 72f6527f_6737_5bc4_f643_b308fe4de273 abf1bc09_403f_110e_0b96_d73f451a8f8b["write()"] 9bf4e446_035a_02cf_567a_f1ff16df2e7e -->|calls| abf1bc09_403f_110e_0b96_d73f451a8f8b 5af4576c_23ff_8e3b_df41_9d71757029eb["writeComplete()"] 9bf4e446_035a_02cf_567a_f1ff16df2e7e -->|calls| 5af4576c_23ff_8e3b_df41_9d71757029eb style 9bf4e446_035a_02cf_567a_f1ff16df2e7e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2RemoteFlowControllerTest.java lines 723–752
@Test
public void flowControlledWriteAndErrorThrowAnException() throws Exception {
final Http2RemoteFlowController.FlowControlled flowControlled = mockedFlowControlledThatThrowsOnWrite();
final Http2Stream stream = stream(STREAM_A);
final RuntimeException fakeException = new RuntimeException("error failed");
doAnswer(new Answer<Void>() {
@Override
public Void answer(InvocationOnMock invocationOnMock) {
throw fakeException;
}
}).when(flowControlled).error(any(ChannelHandlerContext.class), any(Throwable.class));
int windowBefore = window(STREAM_A);
Http2Exception e = assertThrows(Http2Exception.class, new Executable() {
@Override
public void execute() throws Throwable {
controller.addFlowControlled(stream, flowControlled);
controller.writePendingBytes();
}
});
assertSame(fakeException, e.getCause());
verify(flowControlled, atLeastOnce()).write(any(ChannelHandlerContext.class), anyInt());
verify(flowControlled).error(any(ChannelHandlerContext.class), any(Throwable.class));
verify(flowControlled, never()).writeComplete();
assertEquals(90, windowBefore - window(STREAM_A));
verifyNoInteractions(listener);
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does flowControlledWriteAndErrorThrowAnException() do?
flowControlledWriteAndErrorThrowAnException() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2RemoteFlowControllerTest.java.
Where is flowControlledWriteAndErrorThrowAnException() defined?
flowControlledWriteAndErrorThrowAnException() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2RemoteFlowControllerTest.java at line 723.
What does flowControlledWriteAndErrorThrowAnException() call?
flowControlledWriteAndErrorThrowAnException() calls 5 function(s): error, mockedFlowControlledThatThrowsOnWrite, window, write, writeComplete.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free