Home / Function/ test() — netty Function Reference

test() — netty Function Reference

Architecture documentation for the test() function in ProxyHandlerTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  26b74f53_a3a5_ba00_86af_2d89e23a79a9["test()"]
  b21cb09d_c534_66cd_b352_0951b3241181["SuccessTestItem"]
  26b74f53_a3a5_ba00_86af_2d89e23a79a9 -->|defined in| b21cb09d_c534_66cd_b352_0951b3241181
  60a5ed94_0116_766a_e8f8_176d65208647["assertProxyHandlers()"]
  26b74f53_a3a5_ba00_86af_2d89e23a79a9 -->|calls| 60a5ed94_0116_766a_e8f8_176d65208647
  090e8ae4_53fb_bf5d_c36d_b71d6a972d9a["test()"]
  26b74f53_a3a5_ba00_86af_2d89e23a79a9 -->|calls| 090e8ae4_53fb_bf5d_c36d_b71d6a972d9a
  style 26b74f53_a3a5_ba00_86af_2d89e23a79a9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler-proxy/src/test/java/io/netty/handler/proxy/ProxyHandlerTest.java lines 685–721

        @Override
        protected void test() throws Exception {
            final SuccessTestHandler testHandler = new SuccessTestHandler();
            Bootstrap b = new Bootstrap();
            b.group(group);
            b.channel(NioSocketChannel.class);
            b.option(ChannelOption.AUTO_READ, this.autoRead);
            b.resolver(NoopAddressResolverGroup.INSTANCE);
            b.handler(new ChannelInitializer<SocketChannel>() {
                @Override
                protected void initChannel(SocketChannel ch) throws Exception {
                    ChannelPipeline p = ch.pipeline();
                    p.addLast(clientHandlers);
                    p.addLast(new LineBasedFrameDecoder(64));
                    p.addLast(testHandler);
                }
            });

            boolean finished = b.connect(destination).channel().closeFuture().await(10, TimeUnit.SECONDS);

            logger.debug("Received messages: {}", testHandler.received);

            if (testHandler.exceptions.isEmpty()) {
                logger.debug("No recorded exceptions on the client side.");
            } else {
                for (Throwable t : testHandler.exceptions) {
                    logger.debug("Recorded exception on the client side: {}", t);
                }
            }

            assertProxyHandlers(true);

            assertArrayEquals(new Object[] { "0", "1", "2", "3" }, testHandler.received.toArray());
            assertArrayEquals(EmptyArrays.EMPTY_OBJECTS, testHandler.exceptions.toArray());
            assertEquals(expectedEventCount, testHandler.eventCount);
            assertTrue(finished);
        }

Domain

Subdomains

Frequently Asked Questions

What does test() do?
test() is a function in the netty codebase, defined in handler-proxy/src/test/java/io/netty/handler/proxy/ProxyHandlerTest.java.
Where is test() defined?
test() is defined in handler-proxy/src/test/java/io/netty/handler/proxy/ProxyHandlerTest.java at line 685.
What does test() call?
test() calls 2 function(s): assertProxyHandlers, test.

Analyze Your Own Codebase

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

Try Supermodel Free