Home / Function/ testGet() — netty Function Reference

testGet() — netty Function Reference

Architecture documentation for the testGet() function in NettyRuntimeTests.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  91d829ae_f079_1aae_f292_baab7c434dd6["testGet()"]
  f8a8d4a2_21ee_fb99_d44b_e7434e8cbd80["NettyRuntimeTests"]
  91d829ae_f079_1aae_f292_baab7c434dd6 -->|defined in| f8a8d4a2_21ee_fb99_d44b_e7434e8cbd80
  style 91d829ae_f079_1aae_f292_baab7c434dd6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/test/java/io/netty/util/NettyRuntimeTests.java lines 178–193

    @Test
    @SuppressForbidden(reason = "testing fallback to Runtime#availableProcessors")
    public void testGet() {
        final String availableProcessorsSystemProperty = SystemPropertyUtil.get("io.netty.availableProcessors");
        try {
            System.clearProperty("io.netty.availableProcessors");
            final NettyRuntime.AvailableProcessorsHolder holder = new NettyRuntime.AvailableProcessorsHolder();
            assertEquals(Runtime.getRuntime().availableProcessors(), holder.availableProcessors());
        } finally {
            if (availableProcessorsSystemProperty != null) {
                System.setProperty("io.netty.availableProcessors", availableProcessorsSystemProperty);
            } else {
                System.clearProperty("io.netty.availableProcessors");
            }
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testGet() do?
testGet() is a function in the netty codebase, defined in common/src/test/java/io/netty/util/NettyRuntimeTests.java.
Where is testGet() defined?
testGet() is defined in common/src/test/java/io/netty/util/NettyRuntimeTests.java at line 178.

Analyze Your Own Codebase

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

Try Supermodel Free