Home / Function/ testInternalThreadLocalMapExpand() — netty Function Reference

testInternalThreadLocalMapExpand() — netty Function Reference

Architecture documentation for the testInternalThreadLocalMapExpand() function in FastThreadLocalTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  5a307789_6681_37ee_8046_9f1c850d4d8d["testInternalThreadLocalMapExpand()"]
  c9cb652b_4141_8af2_1f8b_c47765bb30f9["FastThreadLocalTest"]
  5a307789_6681_37ee_8046_9f1c850d4d8d -->|defined in| c9cb652b_4141_8af2_1f8b_c47765bb30f9
  7fb6cd58_f112_73b3_6216_2819f285c975["run()"]
  5a307789_6681_37ee_8046_9f1c850d4d8d -->|calls| 7fb6cd58_f112_73b3_6216_2819f285c975
  style 5a307789_6681_37ee_8046_9f1c850d4d8d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/test/java/io/netty/util/concurrent/FastThreadLocalTest.java lines 370–395

    @EnabledIfEnvironmentVariable(named = "CI", matches = "true", disabledReason = "" +
            "This deliberately causes OutOfMemoryErrors, for which heap dumps are automatically generated. " +
            "To avoid confusion, wasted time investigating heap dumps, and to avoid heap dumps accidentally " +
            "getting committed to the Git repository, we should only enable this test when running in a CI " +
            "environment. We make this check by assuming a 'CI' environment variable. " +
            "This matches what Github Actions is doing for us currently.")
    @Test
    public void testInternalThreadLocalMapExpand() throws Exception {
        final AtomicReference<Throwable> throwable = new AtomicReference<Throwable>();
        Runnable runnable = new Runnable() {
            @Override
            public void run() {
                int expand_threshold = 1 << 30;
                try {
                    InternalThreadLocalMap.get().setIndexedVariable(expand_threshold, null);
                } catch (Throwable t) {
                    throwable.set(t);
                }
            }
        };
        FastThreadLocalThread fastThreadLocalThread = new FastThreadLocalThread(runnable);
        fastThreadLocalThread.start();
        fastThreadLocalThread.join();
        // assert the expanded size is not overflowed to negative value
        assertThat(throwable.get()).isNotInstanceOf(NegativeArraySizeException.class);
    }

Domain

Subdomains

Calls

Frequently Asked Questions

What does testInternalThreadLocalMapExpand() do?
testInternalThreadLocalMapExpand() is a function in the netty codebase, defined in common/src/test/java/io/netty/util/concurrent/FastThreadLocalTest.java.
Where is testInternalThreadLocalMapExpand() defined?
testInternalThreadLocalMapExpand() is defined in common/src/test/java/io/netty/util/concurrent/FastThreadLocalTest.java at line 370.
What does testInternalThreadLocalMapExpand() call?
testInternalThreadLocalMapExpand() calls 1 function(s): run.

Analyze Your Own Codebase

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

Try Supermodel Free