Home / Function/ noAutoReadWithReentrantReadDoesNotSOOE() — netty Function Reference

noAutoReadWithReentrantReadDoesNotSOOE() — netty Function Reference

Architecture documentation for the noAutoReadWithReentrantReadDoesNotSOOE() function in Http2MultiplexTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  d6b7cf92_1390_277d_858b_5978a9aa4e19["noAutoReadWithReentrantReadDoesNotSOOE()"]
  4745ff96_ed57_3bd8_9861_4b786d0b6e09["Http2MultiplexTest"]
  d6b7cf92_1390_277d_858b_5978a9aa4e19 -->|defined in| 4745ff96_ed57_3bd8_9861_4b786d0b6e09
  8df7745b_db2d_ef92_4b30_080373ca9f6d["verifyFramesMultiplexedToCorrectChannel()"]
  d6b7cf92_1390_277d_858b_5978a9aa4e19 -->|calls| 8df7745b_db2d_ef92_4b30_080373ca9f6d
  style d6b7cf92_1390_277d_858b_5978a9aa4e19 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java lines 585–623

    @Test
    public void noAutoReadWithReentrantReadDoesNotSOOE() {
        final AtomicBoolean shouldRead = new AtomicBoolean();
        Consumer<ChannelHandlerContext> ctxConsumer = new Consumer<ChannelHandlerContext>() {
            @Override
            public void accept(ChannelHandlerContext obj) {
                if (shouldRead.get()) {
                    obj.read();
                }
            }
        };
        LastInboundHandler inboundHandler = new LastInboundHandler(ctxConsumer);
        AtomicInteger maxReads = new AtomicInteger(1);
        Http2StreamChannel childChannel = newInboundStream(3, false, maxReads, inboundHandler);
        assertTrue(childChannel.config().isAutoRead());
        Http2HeadersFrame headersFrame = inboundHandler.readInbound();
        assertNotNull(headersFrame);

        childChannel.config().setAutoRead(false);

        final int maxWrites = 10000; // enough writes to generated SOOE.
        for (int i = 0; i < maxWrites; ++i) {
            frameInboundWriter.writeInboundData(childChannel.stream().id(), bb(String.valueOf(i)), 0, false);
        }
        frameInboundWriter.writeInboundData(childChannel.stream().id(), bb(String.valueOf(maxWrites)), 0, true);
        shouldRead.set(true);
        childChannel.read();

        for (int i = 0; i < maxWrites; ++i) {
            Http2DataFrame dataFrame0 = inboundHandler.readInbound();
            assertNotNull(dataFrame0);
            release(dataFrame0);
        }
        Http2DataFrame dataFrame0 = inboundHandler.readInbound();
        assertTrue(dataFrame0.isEndStream());
        release(dataFrame0);

        verifyFramesMultiplexedToCorrectChannel(childChannel, inboundHandler, 0);
    }

Domain

Subdomains

Frequently Asked Questions

What does noAutoReadWithReentrantReadDoesNotSOOE() do?
noAutoReadWithReentrantReadDoesNotSOOE() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java.
Where is noAutoReadWithReentrantReadDoesNotSOOE() defined?
noAutoReadWithReentrantReadDoesNotSOOE() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java at line 585.
What does noAutoReadWithReentrantReadDoesNotSOOE() call?
noAutoReadWithReentrantReadDoesNotSOOE() calls 1 function(s): verifyFramesMultiplexedToCorrectChannel.

Analyze Your Own Codebase

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

Try Supermodel Free