Package akka.testkit

Class ExplicitlyTriggeredScheduler

  • All Implemented Interfaces:
    Scheduler

    public class ExplicitlyTriggeredScheduler
    extends java.lang.Object
    implements Scheduler
    For testing: scheduler that does not look at the clock, but must be progressed manually by calling timePasses.

    This allows for faster and less timing-sensitive specs, as jobs will be executed on the test thread instead of using the original {ExecutionContext}. This means recreating specific scenario's becomes easier, but these tests might fail to catch race conditions that only happen when tasks are scheduled in parallel in 'real time'.

    • Constructor Detail

      • ExplicitlyTriggeredScheduler

        public ExplicitlyTriggeredScheduler​(com.typesafe.config.Config config,
                                            LoggingAdapter log,
                                            java.util.concurrent.ThreadFactory tf)