Home / Function/ testAddFirstVoidPromise() — netty Function Reference

testAddFirstVoidPromise() — netty Function Reference

Architecture documentation for the testAddFirstVoidPromise() function in CoalescingBufferQueueTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  79007429_de9b_9439_ee26_90bfb7704206["testAddFirstVoidPromise()"]
  ccc522b2_7fa1_bc1b_d4b4_2b255b9936f9["CoalescingBufferQueueTest"]
  79007429_de9b_9439_ee26_90bfb7704206 -->|defined in| ccc522b2_7fa1_bc1b_d4b4_2b255b9936f9
  f9a9510c_fde3_46f3_be9a_be659d967b32["assertQueueSize()"]
  79007429_de9b_9439_ee26_90bfb7704206 -->|calls| f9a9510c_fde3_46f3_be9a_be659d967b32
  style 79007429_de9b_9439_ee26_90bfb7704206 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/CoalescingBufferQueueTest.java lines 91–112

    @Test
    public void testAddFirstVoidPromise() {
        writeQueue.add(cat, catPromise);
        assertQueueSize(3, false);
        writeQueue.add(mouse, mouseListener);
        assertQueueSize(8, false);
        ChannelPromise aggregatePromise = newPromise();
        assertEquals("catmous", dequeue(7, aggregatePromise));
        ByteBuf remainder = Unpooled.wrappedBuffer("mous".getBytes(CharsetUtil.US_ASCII));
        writeQueue.addFirst(remainder, voidPromise);
        ChannelPromise aggregatePromise2 = newPromise();
        assertEquals("mouse", dequeue(5, aggregatePromise2));
        aggregatePromise2.setSuccess();
        // Because we used a void promise above, we shouldn't complete catPromise until aggregatePromise is completed.
        assertFalse(catPromise.isSuccess());
        assertTrue(mouseSuccess);
        aggregatePromise.setSuccess();
        assertTrue(catPromise.isSuccess());
        assertTrue(mouseSuccess);
        assertEquals(0, cat.refCnt());
        assertEquals(0, mouse.refCnt());
    }

Domain

Subdomains

Frequently Asked Questions

What does testAddFirstVoidPromise() do?
testAddFirstVoidPromise() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/CoalescingBufferQueueTest.java.
Where is testAddFirstVoidPromise() defined?
testAddFirstVoidPromise() is defined in transport/src/test/java/io/netty/channel/CoalescingBufferQueueTest.java at line 91.
What does testAddFirstVoidPromise() call?
testAddFirstVoidPromise() calls 1 function(s): assertQueueSize.

Analyze Your Own Codebase

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

Try Supermodel Free