Home / Function/ testConnectFailsInParentPipeline() — netty Function Reference

testConnectFailsInParentPipeline() — netty Function Reference

Architecture documentation for the testConnectFailsInParentPipeline() function in QuicChannelConnectTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  c60c84bc_9f74_4680_7bcc_daefdb30337c["testConnectFailsInParentPipeline()"]
  1e1bc485_1969_4537_ef9b_f28971b2f663["QuicChannelConnectTest"]
  c60c84bc_9f74_4680_7bcc_daefdb30337c -->|defined in| 1e1bc485_1969_4537_ef9b_f28971b2f663
  5f0fc68a_3438_a865_1307_d0a3144b2c00["assertState()"]
  c60c84bc_9f74_4680_7bcc_daefdb30337c -->|calls| 5f0fc68a_3438_a865_1307_d0a3144b2c00
  style c60c84bc_9f74_4680_7bcc_daefdb30337c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicChannelConnectTest.java lines 531–562

    @ParameterizedTest
    @MethodSource("newSslTaskExecutors")
    public void testConnectFailsInParentPipeline(Executor executor) throws Throwable {
        // Bind to something so we can use the port to connect too and so can ensure we really timeout.
        DatagramSocket socket = new DatagramSocket();
        Channel channel = QuicTestUtils.newClient(executor);
        final Exception exception = new UnsupportedOperationException();
        channel.pipeline().addLast(new ChannelOutboundHandlerAdapter() {
            @Override
            public void connect(ChannelHandlerContext ctx, SocketAddress remoteAddress, SocketAddress localAddress,
                                ChannelPromise promise) {
                promise.setFailure(exception);
            }
        });
        try {
            ChannelStateVerifyHandler verifyHandler = new ChannelStateVerifyHandler();
            Future<QuicChannel> future = QuicTestUtils.newQuicChannelBootstrap(channel)
                    .handler(verifyHandler)
                    .streamHandler(new ChannelInboundHandlerAdapter())
                    .remoteAddress(socket.getLocalSocketAddress())
                    .connect();
            Throwable cause = future.await().cause();
            assertSame(cause, exception);
            verifyHandler.assertState();
        } finally {
            socket.close();
            // Close the parent Datagram channel as well.
            channel.close().sync();

            shutdown(executor);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testConnectFailsInParentPipeline() do?
testConnectFailsInParentPipeline() is a function in the netty codebase, defined in codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicChannelConnectTest.java.
Where is testConnectFailsInParentPipeline() defined?
testConnectFailsInParentPipeline() is defined in codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicChannelConnectTest.java at line 531.
What does testConnectFailsInParentPipeline() call?
testConnectFailsInParentPipeline() calls 1 function(s): assertState.

Analyze Your Own Codebase

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

Try Supermodel Free