Home / Function/ testRemoveAndWriteAllReentrance() — netty Function Reference

testRemoveAndWriteAllReentrance() — netty Function Reference

Architecture documentation for the testRemoveAndWriteAllReentrance() function in PendingWriteQueueTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  03b9d514_fccc_e80c_d009_00c6add00ac6["testRemoveAndWriteAllReentrance()"]
  b4bff24e_be13_7693_4ece_a0ed5ee1a982["PendingWriteQueueTest"]
  03b9d514_fccc_e80c_d009_00c6add00ac6 -->|defined in| b4bff24e_be13_7693_4ece_a0ed5ee1a982
  style 03b9d514_fccc_e80c_d009_00c6add00ac6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/PendingWriteQueueTest.java lines 308–329

    @Test
    public void testRemoveAndWriteAllReentrance() {
        EmbeddedChannel channel = newChannel();
        final PendingWriteQueue queue = new PendingWriteQueue(channel.pipeline().firstContext());

        ChannelPromise promise = channel.newPromise();
        promise.addListener(future -> queue.removeAndWriteAll());
        queue.add(1L, promise);

        ChannelPromise promise2 = channel.newPromise();
        queue.add(2L, promise2);
        queue.removeAndWriteAll();
        channel.flush();
        assertTrue(promise.isSuccess());
        assertTrue(promise2.isSuccess());
        assertTrue(channel.finish());

        assertEquals(1L, (Long) channel.readOutbound());
        assertEquals(2L, (Long) channel.readOutbound());
        assertNull(channel.readOutbound());
        assertNull(channel.readInbound());
    }

Domain

Subdomains

Frequently Asked Questions

What does testRemoveAndWriteAllReentrance() do?
testRemoveAndWriteAllReentrance() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/PendingWriteQueueTest.java.
Where is testRemoveAndWriteAllReentrance() defined?
testRemoveAndWriteAllReentrance() is defined in transport/src/test/java/io/netty/channel/PendingWriteQueueTest.java at line 308.

Analyze Your Own Codebase

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

Try Supermodel Free