Home / Function/ initialWindowUpdateShouldSendEmptyFrame() — netty Function Reference

initialWindowUpdateShouldSendEmptyFrame() — netty Function Reference

Architecture documentation for the initialWindowUpdateShouldSendEmptyFrame() function in DefaultHttp2RemoteFlowControllerTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  4a364a1a_0a19_5f2d_adbd_37f0d918fdfb["initialWindowUpdateShouldSendEmptyFrame()"]
  f8fd7697_92d4_6455_4dd8_09a33ac81a6f["DefaultHttp2RemoteFlowControllerTest"]
  4a364a1a_0a19_5f2d_adbd_37f0d918fdfb -->|defined in| f8fd7697_92d4_6455_4dd8_09a33ac81a6f
  90444244_2b60_c843_559a_6c55d7a4e9ac["assertWritabilityChanged()"]
  4a364a1a_0a19_5f2d_adbd_37f0d918fdfb -->|calls| 90444244_2b60_c843_559a_6c55d7a4e9ac
  136071dd_c92e_5482_7cb2_c1ba0769c1ab["FakeFlowControlled()"]
  4a364a1a_0a19_5f2d_adbd_37f0d918fdfb -->|calls| 136071dd_c92e_5482_7cb2_c1ba0769c1ab
  85ffafbd_47aa_f4f5_fd02_71f26d692e10["sendData()"]
  4a364a1a_0a19_5f2d_adbd_37f0d918fdfb -->|calls| 85ffafbd_47aa_f4f5_fd02_71f26d692e10
  4d627b61_f0ea_0927_043f_7bfb246d71d1["assertNotWritten()"]
  4a364a1a_0a19_5f2d_adbd_37f0d918fdfb -->|calls| 4d627b61_f0ea_0927_043f_7bfb246d71d1
  da0712d5_2b96_e340_6c7a_17114adb9efc["assertFullyWritten()"]
  4a364a1a_0a19_5f2d_adbd_37f0d918fdfb -->|calls| da0712d5_2b96_e340_6c7a_17114adb9efc
  style 4a364a1a_0a19_5f2d_adbd_37f0d918fdfb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2RemoteFlowControllerTest.java lines 485–516

    @Test
    public void initialWindowUpdateShouldSendEmptyFrame() throws Http2Exception {
        controller.initialWindowSize(0);
        assertWritabilityChanged(1, false);
        reset(listener);

        // First send a frame that will get buffered.
        FakeFlowControlled data = new FakeFlowControlled(10, false);
        sendData(STREAM_A, data);
        controller.writePendingBytes();
        data.assertNotWritten();

        // Now send an empty frame on the same stream and verify that it's also buffered.
        FakeFlowControlled data2 = new FakeFlowControlled(0, false);
        sendData(STREAM_A, data2);
        controller.writePendingBytes();
        data2.assertNotWritten();

        // Re-expand the window and verify that both frames were sent.
        controller.initialWindowSize(10);
        verify(listener, never()).writabilityChanged(stream(STREAM_A));
        verify(listener, times(1)).writabilityChanged(stream(STREAM_B));
        verify(listener, times(1)).writabilityChanged(stream(STREAM_C));
        verify(listener, times(1)).writabilityChanged(stream(STREAM_D));
        assertFalse(controller.isWritable(stream(STREAM_A)));
        assertTrue(controller.isWritable(stream(STREAM_B)));
        assertTrue(controller.isWritable(stream(STREAM_C)));
        assertTrue(controller.isWritable(stream(STREAM_D)));

        data.assertFullyWritten();
        data2.assertFullyWritten();
    }

Domain

Subdomains

Frequently Asked Questions

What does initialWindowUpdateShouldSendEmptyFrame() do?
initialWindowUpdateShouldSendEmptyFrame() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2RemoteFlowControllerTest.java.
Where is initialWindowUpdateShouldSendEmptyFrame() defined?
initialWindowUpdateShouldSendEmptyFrame() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2RemoteFlowControllerTest.java at line 485.
What does initialWindowUpdateShouldSendEmptyFrame() call?
initialWindowUpdateShouldSendEmptyFrame() calls 5 function(s): FakeFlowControlled, assertFullyWritten, assertNotWritten, assertWritabilityChanged, sendData.

Analyze Your Own Codebase

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

Try Supermodel Free