Home / Function/ testClearIgnoringIndexes() — netty Function Reference

testClearIgnoringIndexes() — netty Function Reference

Architecture documentation for the testClearIgnoringIndexes() function in DefaultPriorityQueueTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  0fe32ac5_dffb_decf_3750_7b925e3b2e9e["testClearIgnoringIndexes()"]
  23b282eb_d0ea_c3c7_a597_7a1f2dd6296d["DefaultPriorityQueueTest"]
  0fe32ac5_dffb_decf_3750_7b925e3b2e9e -->|defined in| 23b282eb_d0ea_c3c7_a597_7a1f2dd6296d
  4e25103c_6e8f_a58b_a07c_3ee0c1c46f88["assertEmptyQueue()"]
  0fe32ac5_dffb_decf_3750_7b925e3b2e9e -->|calls| 4e25103c_6e8f_a58b_a07c_3ee0c1c46f88
  b6bcf60b_3e0d_b5a5_66f5_198b003d58f1["TestElement()"]
  0fe32ac5_dffb_decf_3750_7b925e3b2e9e -->|calls| b6bcf60b_3e0d_b5a5_66f5_198b003d58f1
  1d5045c6_01ae_270f_c58f_430ee227c7ea["assertOffer()"]
  0fe32ac5_dffb_decf_3750_7b925e3b2e9e -->|calls| 1d5045c6_01ae_270f_c58f_430ee227c7ea
  style 0fe32ac5_dffb_decf_3750_7b925e3b2e9e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/test/java/io/netty/util/internal/DefaultPriorityQueueTest.java lines 110–139

    @Test
    public void testClearIgnoringIndexes() {
        PriorityQueue<TestElement> queue = new DefaultPriorityQueue<TestElement>(TestElementComparator.INSTANCE, 0);
        assertEmptyQueue(queue);

        TestElement a = new TestElement(5);
        TestElement b = new TestElement(10);
        TestElement c = new TestElement(2);
        TestElement d = new TestElement(6);
        TestElement e = new TestElement(11);

        assertOffer(queue, a);
        assertOffer(queue, b);
        assertOffer(queue, c);
        assertOffer(queue, d);

        queue.clearIgnoringIndexes();
        assertEmptyQueue(queue);

        // Elements cannot be re-inserted but new ones can.
        try {
            queue.offer(a);
            fail();
        } catch (IllegalArgumentException t) {
            // expected
        }

        assertOffer(queue, e);
        assertSame(e, queue.peek());
    }

Domain

Subdomains

Frequently Asked Questions

What does testClearIgnoringIndexes() do?
testClearIgnoringIndexes() is a function in the netty codebase, defined in common/src/test/java/io/netty/util/internal/DefaultPriorityQueueTest.java.
Where is testClearIgnoringIndexes() defined?
testClearIgnoringIndexes() is defined in common/src/test/java/io/netty/util/internal/DefaultPriorityQueueTest.java at line 110.
What does testClearIgnoringIndexes() call?
testClearIgnoringIndexes() calls 3 function(s): TestElement, assertEmptyQueue, assertOffer.

Analyze Your Own Codebase

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

Try Supermodel Free