Home / Function/ testFailedFutureNoFailPending() — netty Function Reference

testFailedFutureNoFailPending() — netty Function Reference

Architecture documentation for the testFailedFutureNoFailPending() function in PromiseAggregatorTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  f4a7e5ff_5e69_3437_d1b4_c21ddb8374b6["testFailedFutureNoFailPending()"]
  b88589a3_9d2d_214c_ca51_54d5a42e4fe6["PromiseAggregatorTest"]
  f4a7e5ff_5e69_3437_d1b4_c21ddb8374b6 -->|defined in| b88589a3_9d2d_214c_ca51_54d5a42e4fe6
  style f4a7e5ff_5e69_3437_d1b4_c21ddb8374b6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/test/java/io/netty/util/concurrent/PromiseAggregatorTest.java lines 124–148

    @SuppressWarnings("unchecked")
    @Test
    public void testFailedFutureNoFailPending() throws Exception {
        Promise<Void> p = mock(Promise.class);
        PromiseAggregator<Void, Future<Void>> a =
                new PromiseAggregator<Void, Future<Void>>(p, false);
        Promise<Void> p1 = mock(Promise.class);
        Promise<Void> p2 = mock(Promise.class);
        Throwable t = mock(Throwable.class);

        when(p1.addListener(a)).thenReturn(p1);
        when(p2.addListener(a)).thenReturn(p2);
        when(p1.isSuccess()).thenReturn(false);
        when(p1.cause()).thenReturn(t);
        when(p.setFailure(t)).thenReturn(p);

        a.add(p1, p2);
        a.operationComplete(p1);

        verify(p1).addListener(a);
        verify(p2).addListener(a);
        verify(p1).isSuccess();
        verify(p1).cause();
        verify(p).setFailure(t);
    }

Domain

Subdomains

Frequently Asked Questions

What does testFailedFutureNoFailPending() do?
testFailedFutureNoFailPending() is a function in the netty codebase, defined in common/src/test/java/io/netty/util/concurrent/PromiseAggregatorTest.java.
Where is testFailedFutureNoFailPending() defined?
testFailedFutureNoFailPending() is defined in common/src/test/java/io/netty/util/concurrent/PromiseAggregatorTest.java at line 124.

Analyze Your Own Codebase

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

Try Supermodel Free