Home / Function/ writeRstOnClosedStreamShouldSucceed() — netty Function Reference

writeRstOnClosedStreamShouldSucceed() — netty Function Reference

Architecture documentation for the writeRstOnClosedStreamShouldSucceed() function in Http2ConnectionHandlerTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  a6130616_1424_425d_aef8_a01a47305497["writeRstOnClosedStreamShouldSucceed()"]
  e8b32c7d_fa9d_422b_0744_82047ac00ea5["Http2ConnectionHandlerTest"]
  a6130616_1424_425d_aef8_a01a47305497 -->|defined in| e8b32c7d_fa9d_422b_0744_82047ac00ea5
  style a6130616_1424_425d_aef8_a01a47305497 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/Http2ConnectionHandlerTest.java lines 576–588

    @Test
    public void writeRstOnClosedStreamShouldSucceed() throws Exception {
        handler = newHandler();
        when(stream.id()).thenReturn(STREAM_ID);
        when(frameWriter.writeRstStream(eq(ctx), eq(STREAM_ID),
                anyLong(), any(ChannelPromise.class))).thenReturn(future);
        when(stream.state()).thenReturn(CLOSED);
        when(stream.isHeadersSent()).thenReturn(true);
        // The stream is "closed" but is still known about by the connection (connection().stream(..)
        // will return the stream). We should still write a RST_STREAM frame in this scenario.
        handler.resetStream(ctx, STREAM_ID, STREAM_CLOSED.code(), promise);
        verify(frameWriter).writeRstStream(eq(ctx), eq(STREAM_ID), anyLong(), any(ChannelPromise.class));
    }

Domain

Subdomains

Frequently Asked Questions

What does writeRstOnClosedStreamShouldSucceed() do?
writeRstOnClosedStreamShouldSucceed() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2ConnectionHandlerTest.java.
Where is writeRstOnClosedStreamShouldSucceed() defined?
writeRstOnClosedStreamShouldSucceed() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2ConnectionHandlerTest.java at line 576.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free