Home / Function/ testNewTimeoutShouldStopThrowingRejectedExecutionExceptionWhenExistingTimeoutIsCancelled() — netty Function Reference

testNewTimeoutShouldStopThrowingRejectedExecutionExceptionWhenExistingTimeoutIsCancelled() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  ca2cf6ca_a17f_c8c7_5b29_c9d6b330e3f9["testNewTimeoutShouldStopThrowingRejectedExecutionExceptionWhenExistingTimeoutIsCancelled()"]
  00b49e45_9607_bed0_2d5f_fd3bdc9b959f["HashedWheelTimerTest"]
  ca2cf6ca_a17f_c8c7_5b29_c9d6b330e3f9 -->|defined in| 00b49e45_9607_bed0_2d5f_fd3bdc9b959f
  style ca2cf6ca_a17f_c8c7_5b29_c9d6b330e3f9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/test/java/io/netty/util/HashedWheelTimerTest.java lines 215–232

    @Test
    public void testNewTimeoutShouldStopThrowingRejectedExecutionExceptionWhenExistingTimeoutIsCancelled()
        throws InterruptedException {
        final int tickDurationMs = 100;
        final HashedWheelTimer timer = new HashedWheelTimer(Executors.defaultThreadFactory(), tickDurationMs,
            TimeUnit.MILLISECONDS, 32, true, 2);
        timer.newTimeout(createNoOpTimerTask(), 5, TimeUnit.SECONDS);
        Timeout timeoutToCancel = timer.newTimeout(createNoOpTimerTask(), 5, TimeUnit.SECONDS);
        assertTrue(timeoutToCancel.cancel());

        Thread.sleep(tickDurationMs * 5);

        final CountDownLatch secondLatch = new CountDownLatch(1);
        timer.newTimeout(createCountDownLatchTimerTask(secondLatch), 90, TimeUnit.MILLISECONDS);

        secondLatch.await();
        timer.stop();
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free