Home / Function/ testUniqueIpFilterHandler() — netty Function Reference

testUniqueIpFilterHandler() — netty Function Reference

Architecture documentation for the testUniqueIpFilterHandler() function in UniqueIpFilterTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  036e83aa_d0d3_f2bf_0be2_4f2510191b24["testUniqueIpFilterHandler()"]
  a74d4a73_e4e4_9c5c_930d_7d3ee65c7137["UniqueIpFilterTest"]
  036e83aa_d0d3_f2bf_0be2_4f2510191b24 -->|defined in| a74d4a73_e4e4_9c5c_930d_7d3ee65c7137
  4f676050_4c24_f361_f493_0a591cde99bc["newChannelAsync()"]
  036e83aa_d0d3_f2bf_0be2_4f2510191b24 -->|calls| 4f676050_4c24_f361_f493_0a591cde99bc
  style 036e83aa_d0d3_f2bf_0be2_4f2510191b24 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/test/java/io/netty/handler/ipfilter/UniqueIpFilterTest.java lines 36–57

    @Test
    public void testUniqueIpFilterHandler() throws ExecutionException, InterruptedException {
        final CyclicBarrier barrier = new CyclicBarrier(2);
        ExecutorService executorService = Executors.newFixedThreadPool(2);
        try {
            for (int round = 0; round < 10000; round++) {
                final UniqueIpFilter ipFilter = new UniqueIpFilter();
                Future<EmbeddedChannel> future1 = newChannelAsync(barrier, executorService, ipFilter);
                Future<EmbeddedChannel> future2 = newChannelAsync(barrier, executorService, ipFilter);
                EmbeddedChannel ch1 = future1.get();
                EmbeddedChannel ch2 = future2.get();
                assertTrue(ch1.isActive() || ch2.isActive());
                assertFalse(ch1.isActive() && ch2.isActive());

                barrier.reset();
                ch1.close().await();
                ch2.close().await();
            }
        } finally {
            executorService.shutdown();
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testUniqueIpFilterHandler() do?
testUniqueIpFilterHandler() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/ipfilter/UniqueIpFilterTest.java.
Where is testUniqueIpFilterHandler() defined?
testUniqueIpFilterHandler() is defined in handler/src/test/java/io/netty/handler/ipfilter/UniqueIpFilterTest.java at line 36.
What does testUniqueIpFilterHandler() call?
testUniqueIpFilterHandler() calls 1 function(s): newChannelAsync.

Analyze Your Own Codebase

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

Try Supermodel Free