Home / Function/ testPromisesPassed() — netty Function Reference

testPromisesPassed() — netty Function Reference

Architecture documentation for the testPromisesPassed() function in CombinedChannelDuplexHandlerTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  e5446515_c21b_50da_6c58_52140ea78ad4["testPromisesPassed()"]
  9460024d_25ec_0588_e029_9fb5fddbbe6d["CombinedChannelDuplexHandlerTest"]
  e5446515_c21b_50da_6c58_52140ea78ad4 -->|defined in| 9460024d_25ec_0588_e029_9fb5fddbbe6d
  96d4af81_a2b4_26db_45c9_e717d753bc7b["bind()"]
  e5446515_c21b_50da_6c58_52140ea78ad4 -->|calls| 96d4af81_a2b4_26db_45c9_e717d753bc7b
  9524403e_b4a7_5578_74ea_1eb43c3b6262["connect()"]
  e5446515_c21b_50da_6c58_52140ea78ad4 -->|calls| 9524403e_b4a7_5578_74ea_1eb43c3b6262
  685f57ed_729e_a9f6_b762_81412763289e["close()"]
  e5446515_c21b_50da_6c58_52140ea78ad4 -->|calls| 685f57ed_729e_a9f6_b762_81412763289e
  081dc255_e8c9_ac4c_b66e_ddd00f07e206["disconnect()"]
  e5446515_c21b_50da_6c58_52140ea78ad4 -->|calls| 081dc255_e8c9_ac4c_b66e_ddd00f07e206
  348467f5_ee94_ea82_e7b6_4e44a0f622ed["write()"]
  e5446515_c21b_50da_6c58_52140ea78ad4 -->|calls| 348467f5_ee94_ea82_e7b6_4e44a0f622ed
  fec32aa8_4bab_4285_138e_426f49e332fd["deregister()"]
  e5446515_c21b_50da_6c58_52140ea78ad4 -->|calls| fec32aa8_4bab_4285_138e_426f49e332fd
  style e5446515_c21b_50da_6c58_52140ea78ad4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/CombinedChannelDuplexHandlerTest.java lines 280–313

    @Test
    @Timeout(value = 3000, unit = TimeUnit.MILLISECONDS)
    public void testPromisesPassed() {
        OutboundEventHandler outboundHandler = new OutboundEventHandler();
        EmbeddedChannel ch = new EmbeddedChannel(outboundHandler,
                new CombinedChannelDuplexHandler<ChannelInboundHandler, ChannelOutboundHandler>(
                        new ChannelInboundHandlerAdapter(), new ChannelOutboundHandlerAdapter()));
        ChannelPipeline pipeline = ch.pipeline();

        ChannelPromise promise = ch.newPromise();
        pipeline.bind(LOCAL_ADDRESS, promise);
        promise.syncUninterruptibly();

        promise = ch.newPromise();
        pipeline.connect(REMOTE_ADDRESS, LOCAL_ADDRESS, promise);
        promise.syncUninterruptibly();

        promise = ch.newPromise();
        pipeline.close(promise);
        promise.syncUninterruptibly();

        promise = ch.newPromise();
        pipeline.disconnect(promise);
        promise.syncUninterruptibly();

        promise = ch.newPromise();
        pipeline.write(MSG, promise);
        promise.syncUninterruptibly();

        promise = ch.newPromise();
        pipeline.deregister(promise);
        promise.syncUninterruptibly();
        ch.finish();
    }

Domain

Subdomains

Frequently Asked Questions

What does testPromisesPassed() do?
testPromisesPassed() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/CombinedChannelDuplexHandlerTest.java.
Where is testPromisesPassed() defined?
testPromisesPassed() is defined in transport/src/test/java/io/netty/channel/CombinedChannelDuplexHandlerTest.java at line 280.
What does testPromisesPassed() call?
testPromisesPassed() calls 6 function(s): bind, close, connect, deregister, disconnect, write.

Analyze Your Own Codebase

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

Try Supermodel Free