Home / Function/ testResolve() — netty Function Reference

testResolve() — netty Function Reference

Architecture documentation for the testResolve() function in ResolveAddressHandlerTest.java from the netty codebase.

Function java Buffer Allocators calls 1 called by 2

Entity Profile

Dependency Diagram

graph TD
  dbaba18a_b7a6_dfc9_285a_5717f4fcbb71["testResolve()"]
  7fdd24de_3acd_a289_07d2_827773dc55b2["ResolveAddressHandlerTest"]
  dbaba18a_b7a6_dfc9_285a_5717f4fcbb71 -->|defined in| 7fdd24de_3acd_a289_07d2_827773dc55b2
  c6cde13e_fca2_e8f8_9a3a_05d0802d04db["testResolveSuccessful()"]
  c6cde13e_fca2_e8f8_9a3a_05d0802d04db -->|calls| dbaba18a_b7a6_dfc9_285a_5717f4fcbb71
  ee724e3e_2f8b_d0dc_126c_43710db82aeb["testResolveFails()"]
  ee724e3e_2f8b_d0dc_126c_43710db82aeb -->|calls| dbaba18a_b7a6_dfc9_285a_5717f4fcbb71
  99bb219a_51d7_ec01_5f20_299c705efa40["TestResolverGroup()"]
  dbaba18a_b7a6_dfc9_285a_5717f4fcbb71 -->|calls| 99bb219a_51d7_ec01_5f20_299c705efa40
  style dbaba18a_b7a6_dfc9_285a_5717f4fcbb71 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/test/java/io/netty/handler/address/ResolveAddressHandlerTest.java lines 79–109

    private static void testResolve(boolean fail) {
        AddressResolverGroup<SocketAddress> resolverGroup = new TestResolverGroup(fail);
        Bootstrap cb = new Bootstrap();
        cb.group(group).channel(LocalChannel.class).handler(new ResolveAddressHandler(resolverGroup));

        ServerBootstrap sb = new ServerBootstrap();
        sb.group(group)
                .channel(LocalServerChannel.class)
                .childHandler(new ChannelInboundHandlerAdapter() {
                    @Override
                    public void channelActive(ChannelHandlerContext ctx) {
                        ctx.close();
                    }
                });

        // Start server
        Channel sc = sb.bind(RESOLVED).syncUninterruptibly().channel();
        ChannelFuture future = cb.connect(UNRESOLVED).awaitUninterruptibly();
        try {
            if (fail) {
                assertSame(ERROR, future.cause());
            } else {
                assertTrue(future.isSuccess());
            }
            future.channel().close().syncUninterruptibly();
        } finally {
            future.channel().close().syncUninterruptibly();
            sc.close().syncUninterruptibly();
            resolverGroup.close();
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testResolve() do?
testResolve() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/address/ResolveAddressHandlerTest.java.
Where is testResolve() defined?
testResolve() is defined in handler/src/test/java/io/netty/handler/address/ResolveAddressHandlerTest.java at line 79.
What does testResolve() call?
testResolve() calls 1 function(s): TestResolverGroup.
What calls testResolve()?
testResolve() is called by 2 function(s): testResolveFails, testResolveSuccessful.

Analyze Your Own Codebase

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

Try Supermodel Free