Home / Function/ testRegistrationAfterShutdown() — netty Function Reference

testRegistrationAfterShutdown() — netty Function Reference

Architecture documentation for the testRegistrationAfterShutdown() function in SingleThreadEventLoopTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  5f61287a_986f_53fa_0dc5_6f76d568a499["testRegistrationAfterShutdown()"]
  42a05bb6_77d1_5163_f1de_dc06e1ae82b0["SingleThreadEventLoopTest"]
  5f61287a_986f_53fa_0dc5_6f76d568a499 -->|defined in| 42a05bb6_77d1_5163_f1de_dc06e1ae82b0
  style 5f61287a_986f_53fa_0dc5_6f76d568a499 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/test/java/io/netty/channel/SingleThreadEventLoopTest.java lines 373–399

    @Test
    @Timeout(value = 10000, unit = TimeUnit.MILLISECONDS)
    @SuppressWarnings("deprecation")
    public void testRegistrationAfterShutdown() throws Exception {
        loopA.shutdown();

        // Disable logging temporarily.
        Logger root = (Logger) LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
        List<Appender<ILoggingEvent>> appenders = new ArrayList<Appender<ILoggingEvent>>();
        for (Iterator<Appender<ILoggingEvent>> i = root.iteratorForAppenders(); i.hasNext();) {
            Appender<ILoggingEvent> a = i.next();
            appenders.add(a);
            root.detachAppender(a);
        }

        try {
            ChannelFuture f = loopA.register(new LocalChannel());
            f.awaitUninterruptibly();
            assertFalse(f.isSuccess());
            assertInstanceOf(RejectedExecutionException.class, f.cause());
            assertFalse(f.channel().isOpen());
        } finally {
            for (Appender<ILoggingEvent> a: appenders) {
                root.addAppender(a);
            }
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testRegistrationAfterShutdown() do?
testRegistrationAfterShutdown() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/SingleThreadEventLoopTest.java.
Where is testRegistrationAfterShutdown() defined?
testRegistrationAfterShutdown() is defined in transport/src/test/java/io/netty/channel/SingleThreadEventLoopTest.java at line 373.

Analyze Your Own Codebase

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

Try Supermodel Free