Home / Function/ testAddFirstPromiseRetained() — netty Function Reference

testAddFirstPromiseRetained() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/CoalescingBufferQueueTest.java lines 72–89

    @Test
    public void testAddFirstPromiseRetained() {
        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, aggregatePromise);
        ChannelPromise aggregatePromise2 = newPromise();
        assertEquals("mouse", dequeue(5, aggregatePromise2));
        aggregatePromise2.setSuccess();
        assertTrue(catPromise.isSuccess());
        assertTrue(mouseSuccess);
        assertEquals(0, cat.refCnt());
        assertEquals(0, mouse.refCnt());
    }

Domain

Subdomains

Frequently Asked Questions

What does testAddFirstPromiseRetained() do?
testAddFirstPromiseRetained() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/CoalescingBufferQueueTest.java.
Where is testAddFirstPromiseRetained() defined?
testAddFirstPromiseRetained() is defined in transport/src/test/java/io/netty/channel/CoalescingBufferQueueTest.java at line 72.
What does testAddFirstPromiseRetained() call?
testAddFirstPromiseRetained() 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