Home / Function/ testStopTimerCancelsPendingTasks() — netty Function Reference

testStopTimerCancelsPendingTasks() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

common/src/test/java/io/netty/util/HashedWheelTimerTest.java lines 285–301

    @Test
    @org.junit.jupiter.api.Timeout(value = 3000, unit = TimeUnit.MILLISECONDS)
    public void testStopTimerCancelsPendingTasks() throws InterruptedException {
        final Timer timerUnprocessed = new HashedWheelTimer();
        for (int i = 0; i < 5; i ++) {
            timerUnprocessed.newTimeout(new TimerTask() {
                @Override
                public void run(Timeout timeout) throws Exception {
                }
            }, 5, TimeUnit.SECONDS);
        }
        Thread.sleep(1000L); // sleep for a second

        for (Timeout timeout : timerUnprocessed.stop()) {
            assertTrue(timeout.isCancelled(), "All unprocessed tasks should be canceled");
        }
    }

Domain

Subdomains

Calls

Frequently Asked Questions

What does testStopTimerCancelsPendingTasks() do?
testStopTimerCancelsPendingTasks() is a function in the netty codebase, defined in common/src/test/java/io/netty/util/HashedWheelTimerTest.java.
Where is testStopTimerCancelsPendingTasks() defined?
testStopTimerCancelsPendingTasks() is defined in common/src/test/java/io/netty/util/HashedWheelTimerTest.java at line 285.
What does testStopTimerCancelsPendingTasks() call?
testStopTimerCancelsPendingTasks() 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