Class ManuallyTriggeredScheduledExecutorService

java.lang.Object
org.apache.flink.core.testutils.ManuallyTriggeredScheduledExecutorService
All Implemented Interfaces:
Executor, ExecutorService, ScheduledExecutorService

public class ManuallyTriggeredScheduledExecutorService extends Object implements ScheduledExecutorService
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.