Home / Function/ testConnectTimeout() — netty Function Reference

testConnectTimeout() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicChannelConnectTest.java lines 505–529

    @ParameterizedTest
    @MethodSource("newSslTaskExecutors")
    public void testConnectTimeout(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);
        try {
            ChannelStateVerifyHandler verifyHandler = new ChannelStateVerifyHandler();
            Future<QuicChannel> future = QuicTestUtils.newQuicChannelBootstrap(channel)
                    .handler(verifyHandler)
                    .streamHandler(new ChannelInboundHandlerAdapter())
                    .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 10)
                    .remoteAddress(socket.getLocalSocketAddress())
                    .connect();
            Throwable cause = future.await().cause();
            assertInstanceOf(ConnectTimeoutException.class, cause);
            verifyHandler.assertState();
        } finally {
            socket.close();
            // Close the parent Datagram channel as well.
            channel.close().sync();

            shutdown(executor);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testConnectTimeout() do?
testConnectTimeout() is a function in the netty codebase, defined in codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicChannelConnectTest.java.
Where is testConnectTimeout() defined?
testConnectTimeout() is defined in codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicChannelConnectTest.java at line 505.
What does testConnectTimeout() call?
testConnectTimeout() 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