Home / Class/ AbstractTestsuiteTest Class — netty Architecture

AbstractTestsuiteTest Class — netty Architecture

Architecture documentation for the AbstractTestsuiteTest class in AbstractTestsuiteTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  c7c179fa_aff6_e090_cee4_791dc0c5cc40["AbstractTestsuiteTest"]
  08c85c90_6077_7d35_eb52_3207a71a9251["AbstractTestsuiteTest.java"]
  c7c179fa_aff6_e090_cee4_791dc0c5cc40 -->|defined in| 08c85c90_6077_7d35_eb52_3207a71a9251
  f23341ef_51c5_8344_c72c_fcc6ac4f8d72["newFactories()"]
  c7c179fa_aff6_e090_cee4_791dc0c5cc40 -->|method| f23341ef_51c5_8344_c72c_fcc6ac4f8d72
  68d9ea72_c08d_eb64_896f_4be9b913c0b1["newAllocators()"]
  c7c179fa_aff6_e090_cee4_791dc0c5cc40 -->|method| 68d9ea72_c08d_eb64_896f_4be9b913c0b1
  7542154c_90c0_6e01_44b5_00f87050049d["run()"]
  c7c179fa_aff6_e090_cee4_791dc0c5cc40 -->|method| 7542154c_90c0_6e01_44b5_00f87050049d
  d5fe3833_45d3_5809_d366_3678bd875588["configure()"]
  c7c179fa_aff6_e090_cee4_791dc0c5cc40 -->|method| d5fe3833_45d3_5809_d366_3678bd875588

Relationship Graph

Source Code

testsuite/src/main/java/io/netty/testsuite/transport/AbstractTestsuiteTest.java lines 28–59

public abstract class AbstractTestsuiteTest<T extends AbstractBootstrap<?, ?>> {
    protected final InternalLogger logger = InternalLoggerFactory.getInstance(getClass());
    protected volatile T cb;

    protected abstract List<TestsuitePermutation.BootstrapFactory<T>> newFactories();

    protected List<ByteBufAllocator> newAllocators() {
        return TestsuitePermutation.allocator();
    }

    protected void run(TestInfo testInfo, Runner<T> runner) throws Throwable {
        List<TestsuitePermutation.BootstrapFactory<T>> combos = newFactories();
        String methodName = TestUtils.testMethodName(testInfo);
        for (ByteBufAllocator allocator: newAllocators()) {
            int i = 0;
            for (TestsuitePermutation.BootstrapFactory<T> e: combos) {
                cb = e.newInstance();
                configure(cb, allocator);
                logger.info(String.format(
                        "Running: %s %d of %d with %s",
                        methodName, ++ i, combos.size(), StringUtil.simpleClassName(allocator)));
                runner.run(cb);
            }
        }
    }

    protected abstract void configure(T bootstrap, ByteBufAllocator allocator);

    public interface Runner<CB extends AbstractBootstrap<?, ?>> {
        void run(CB cb) throws Throwable;
    }
}

Frequently Asked Questions

What is the AbstractTestsuiteTest class?
AbstractTestsuiteTest is a class in the netty codebase, defined in testsuite/src/main/java/io/netty/testsuite/transport/AbstractTestsuiteTest.java.
Where is AbstractTestsuiteTest defined?
AbstractTestsuiteTest is defined in testsuite/src/main/java/io/netty/testsuite/transport/AbstractTestsuiteTest.java at line 28.

Analyze Your Own Codebase

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

Try Supermodel Free