Home / Function/ testWithFragmentSize() — netty Function Reference

testWithFragmentSize() — netty Function Reference

Architecture documentation for the testWithFragmentSize() function in SniHandlerTest.java from the netty codebase.

Function java Buffer Allocators calls 2 called by 2

Entity Profile

Dependency Diagram

graph TD
  d73ebfb6_9ce4_313d_a85b_5057d9debdae["testWithFragmentSize()"]
  00b45f27_cbf5_af92_430f_7f0426117fa5["SniHandlerTest"]
  d73ebfb6_9ce4_313d_a85b_5057d9debdae -->|defined in| 00b45f27_cbf5_af92_430f_7f0426117fa5
  685aab7d_04b9_f473_82b1_13966c171abd["testNonFragmented()"]
  685aab7d_04b9_f473_82b1_13966c171abd -->|calls| d73ebfb6_9ce4_313d_a85b_5057d9debdae
  531f6d3e_a9a7_6fc9_c567_0dfed7ceda92["testFragmented()"]
  531f6d3e_a9a7_6fc9_c567_0dfed7ceda92 -->|calls| d73ebfb6_9ce4_313d_a85b_5057d9debdae
  6b9b70c0_eeec_0906_9031_a6f1f1812e07["clientHelloInMultipleFragments()"]
  d73ebfb6_9ce4_313d_a85b_5057d9debdae -->|calls| 6b9b70c0_eeec_0906_9031_a6f1f1812e07
  495097de_5185_3185_66b9_43abc32cf9ab["releaseAll()"]
  d73ebfb6_9ce4_313d_a85b_5057d9debdae -->|calls| 495097de_5185_3185_66b9_43abc32cf9ab
  style d73ebfb6_9ce4_313d_a85b_5057d9debdae fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/test/java/io/netty/handler/ssl/SniHandlerTest.java lines 649–673

    private void testWithFragmentSize(SslProvider provider, final int maxFragmentSize) throws Exception {
        final String sni = "netty.io";
        SelfSignedCertificate cert = CachedSelfSignedCertificate.getCachedCertificate();
        final SslContext context = SslContextBuilder.forServer(cert.key(), cert.cert())
                .sslProvider(provider)
                .build();
        try {
            @SuppressWarnings("unchecked") final EmbeddedChannel server = new EmbeddedChannel(
                    new SniHandler(mock(DomainNameMapping.class)) {
                @Override
                protected Future<SslContext> lookup(final ChannelHandlerContext ctx, final String hostname) {
                    assertEquals(sni, hostname);
                    return ctx.executor().newSucceededFuture(context);
                }
            });

            final List<ByteBuf> buffers = clientHelloInMultipleFragments(provider, sni, maxFragmentSize);
            for (ByteBuf buffer : buffers) {
                server.writeInbound(buffer);
            }
            assertTrue(server.finishAndReleaseAll());
        } finally {
            releaseAll(context);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testWithFragmentSize() do?
testWithFragmentSize() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ssl/SniHandlerTest.java.
Where is testWithFragmentSize() defined?
testWithFragmentSize() is defined in handler/src/test/java/io/netty/handler/ssl/SniHandlerTest.java at line 649.
What does testWithFragmentSize() call?
testWithFragmentSize() calls 2 function(s): clientHelloInMultipleFragments, releaseAll.
What calls testWithFragmentSize()?
testWithFragmentSize() is called by 2 function(s): testFragmented, testNonFragmented.

Analyze Your Own Codebase

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

Try Supermodel Free