Home / Function/ testTimerShouldThrowExceptionAfterShutdownForNewTimeouts() — netty Function Reference

testTimerShouldThrowExceptionAfterShutdownForNewTimeouts() — netty Function Reference

Architecture documentation for the testTimerShouldThrowExceptionAfterShutdownForNewTimeouts() function in HashedWheelTimerTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  890ee8a4_685e_5d59_b0b2_0694b06fb41a["testTimerShouldThrowExceptionAfterShutdownForNewTimeouts()"]
  00b49e45_9607_bed0_2d5f_fd3bdc9b959f["HashedWheelTimerTest"]
  890ee8a4_685e_5d59_b0b2_0694b06fb41a -->|defined in| 00b49e45_9607_bed0_2d5f_fd3bdc9b959f
  c46ba577_0225_1b73_1919_e2b7cb5a1767["TimerTask()"]
  890ee8a4_685e_5d59_b0b2_0694b06fb41a -->|calls| c46ba577_0225_1b73_1919_e2b7cb5a1767
  style 890ee8a4_685e_5d59_b0b2_0694b06fb41a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/test/java/io/netty/util/HashedWheelTimerTest.java lines 97–120

    @Test
    @org.junit.jupiter.api.Timeout(value = 3000, unit = TimeUnit.MILLISECONDS)
    public void testTimerShouldThrowExceptionAfterShutdownForNewTimeouts() throws InterruptedException {
        final CountDownLatch latch = new CountDownLatch(3);
        final Timer timer = new HashedWheelTimer();
        for (int i = 0; i < 3; i ++) {
            timer.newTimeout(new TimerTask() {
                @Override
                public void run(Timeout timeout) throws Exception {
                    latch.countDown();
                }
            }, 1, TimeUnit.MILLISECONDS);
        }

        latch.await();
        timer.stop();

        try {
            timer.newTimeout(createNoOpTimerTask(), 1, TimeUnit.MILLISECONDS);
            fail("Expected exception didn't occur.");
        } catch (IllegalStateException ignored) {
            // expected
        }
    }

Domain

Subdomains

Calls

Frequently Asked Questions

What does testTimerShouldThrowExceptionAfterShutdownForNewTimeouts() do?
testTimerShouldThrowExceptionAfterShutdownForNewTimeouts() is a function in the netty codebase, defined in common/src/test/java/io/netty/util/HashedWheelTimerTest.java.
Where is testTimerShouldThrowExceptionAfterShutdownForNewTimeouts() defined?
testTimerShouldThrowExceptionAfterShutdownForNewTimeouts() is defined in common/src/test/java/io/netty/util/HashedWheelTimerTest.java at line 97.
What does testTimerShouldThrowExceptionAfterShutdownForNewTimeouts() call?
testTimerShouldThrowExceptionAfterShutdownForNewTimeouts() calls 1 function(s): TimerTask.

Analyze Your Own Codebase

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

Try Supermodel Free