Home / Function/ testConnectSuccessWhenTrustManagerBuildFromSameCert() — netty Function Reference

testConnectSuccessWhenTrustManagerBuildFromSameCert() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

codec-native-quic/src/test/java/io/netty/handler/codec/quic/QuicChannelConnectTest.java lines 1200–1235

    @ParameterizedTest
    @MethodSource("newSslTaskExecutors")
    public void testConnectSuccessWhenTrustManagerBuildFromSameCert(Executor executor) throws Throwable {
        Channel server = QuicTestUtils.newServer(QuicTestUtils.newQuicServerBuilder(executor,
                        QuicSslContextBuilder.forServer(
                                QuicTestUtils.SELF_SIGNED_CERTIFICATE.privateKey(), null,
                                        QuicTestUtils.SELF_SIGNED_CERTIFICATE.certificate())
                                .applicationProtocols(QuicTestUtils.PROTOS).clientAuth(ClientAuth.NONE).build()),
                TestQuicTokenHandler.INSTANCE, new ChannelInboundHandlerAdapter(),
                new ChannelInboundHandlerAdapter());
        InetSocketAddress address = (InetSocketAddress) server.localAddress();

        Channel channel = QuicTestUtils.newClient(QuicTestUtils.newQuicClientBuilder(executor,
                QuicSslContextBuilder.forClient()
                        .trustManager(QuicTestUtils.SELF_SIGNED_CERTIFICATE.certificate())
                        .applicationProtocols(QuicTestUtils.PROTOS).build()));
        try {
            ChannelActiveVerifyHandler clientQuicChannelHandler = new ChannelActiveVerifyHandler();
            QuicChannel quicChannel = QuicTestUtils.newQuicChannelBootstrap(channel)
                    .handler(clientQuicChannelHandler)
                    .streamHandler(new ChannelInboundHandlerAdapter())
                    .remoteAddress(address)
                    .connect()
                    .get();
            assertTrue(quicChannel.close().await().isSuccess());
            ChannelFuture closeFuture = quicChannel.closeFuture().await();
            assertTrue(closeFuture.isSuccess());
            clientQuicChannelHandler.assertState();
        } finally {
            server.close().sync();
            // Close the parent Datagram channel as well.
            channel.close().sync();

            shutdown(executor);
        }
    }

Domain

Subdomains

Frequently Asked Questions

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