Home / Function/ serverShouldCreateStreamIfNeededBeforeSending431() — netty Function Reference

serverShouldCreateStreamIfNeededBeforeSending431() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/Http2ConnectionHandlerTest.java lines 532–555

    @Test
    public void serverShouldCreateStreamIfNeededBeforeSending431() throws Exception {
        int padding = 0;
        handler = newHandler();
        Http2Exception e = new Http2Exception.HeaderListSizeException(STREAM_ID, PROTOCOL_ERROR,
            "Header size exceeded max allowed size 8196", true);

        when(connection.stream(STREAM_ID)).thenReturn(null);
        when(remote.createStream(STREAM_ID, true)).thenReturn(stream);
        when(stream.id()).thenReturn(STREAM_ID);

        when(connection.isServer()).thenReturn(true);
        when(stream.isHeadersSent()).thenReturn(false);
        when(remote.lastStreamCreated()).thenReturn(STREAM_ID);
        when(encoder.writeRstStream(eq(ctx), eq(STREAM_ID),
            eq(PROTOCOL_ERROR.code()), eq(promise))).thenReturn(future);
        handler.exceptionCaught(ctx, e);

        verify(remote).createStream(STREAM_ID, true);
        verify(encoder).writeHeaders(eq(ctx), eq(STREAM_ID),
            any(Http2Headers.class), eq(padding), eq(true), eq(promise));

        verify(encoder).writeRstStream(ctx, STREAM_ID, PROTOCOL_ERROR.code(), promise);
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free