Class ManuallyTriggeredScheduledExecutorService

  • All Implemented Interfaces:
    Executor, ExecutorService, ScheduledExecutorService

    public class ManuallyTriggeredScheduledExecutorService
    extends Object
    implements ScheduledExecutorService
    This code is copied verbatim from org.apache.flink.core.testutils.ManuallyTriggeredScheduledExecutorService

    Simple ScheduledExecutorService implementation for testing purposes. It spawns no threads, but lets you trigger the execution of tasks manually.

    This class is helpful when implementing tests tasks synchronous and control when they run, which would otherwise asynchronous and require complex triggers and latches to test.