Class ActorTestKit$


  • public class ActorTestKit$
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static ActorTestKit$ MODULE$
      Static reference to the singleton instance of this Scala object.
    • Constructor Summary

      Constructors 
      Constructor Description
      ActorTestKit$()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ActorTestKit create()
      Create a testkit named from the class that is calling this method.
      ActorTestKit create​(java.lang.String name)
      Create a named testkit.
      ActorTestKit create​(java.lang.String name, com.typesafe.config.Config customConfig)
      Create a named testkit, and use a custom config for the actor system.
      ActorTestKit create​(java.lang.String name, com.typesafe.config.Config customConfig, TestKitSettings settings)
      Create a named testkit, and use a custom config for the actor system, and a custom TestKitSettings
      void shutdown​(ActorSystem<?> system)
      Shutdown the given ActorSystem and block until it shuts down, if more time than system-shutdown-default passes an exception is thrown (can be configured with throw-on-shutdown-timeout).
      void shutdown​(ActorSystem<?> system, java.time.Duration duration)
      Shutdown the given ActorSystem and block until it shuts down, if more time than system-shutdown-default passes an exception is thrown (can be configured with throw-on-shutdown-timeout).
      void shutdown​(ActorSystem<?> system, java.time.Duration duration, boolean throwIfShutdownTimesOut)
      Shutdown the given actor system and wait up to duration for shutdown to complete.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MODULE$

        public static final ActorTestKit$ MODULE$
        Static reference to the singleton instance of this Scala object.
    • Constructor Detail

      • ActorTestKit$

        public ActorTestKit$()
    • Method Detail

      • create

        public ActorTestKit create()
        Create a testkit named from the class that is calling this method.

        It will create an ActorSystem with this name, e.g. threads will include the name. When the test has completed you should terminate the ActorSystem and the testkit with ActorTestKit.shutdownTestKit().

        Returns:
        (undocumented)
      • create

        public ActorTestKit create​(java.lang.String name)
        Create a named testkit.

        It will create an ActorSystem with this name, e.g. threads will include the name. When the test has completed you should terminate the ActorSystem and the testkit with ActorTestKit.shutdownTestKit().

        Parameters:
        name - (undocumented)
        Returns:
        (undocumented)
      • create

        public ActorTestKit create​(java.lang.String name,
                                   com.typesafe.config.Config customConfig)
        Create a named testkit, and use a custom config for the actor system.

        It will create an ActorSystem with this name, e.g. threads will include the name. When the test has completed you should terminate the ActorSystem and the testkit with ActorTestKit.shutdownTestKit().

        Parameters:
        name - (undocumented)
        customConfig - (undocumented)
        Returns:
        (undocumented)
      • create

        public ActorTestKit create​(java.lang.String name,
                                   com.typesafe.config.Config customConfig,
                                   TestKitSettings settings)
        Create a named testkit, and use a custom config for the actor system, and a custom TestKitSettings

        It will create an ActorSystem with this name, e.g. threads will include the name. When the test has completed you should terminate the ActorSystem and the testkit with ActorTestKit.shutdownTestKit().

        Parameters:
        name - (undocumented)
        customConfig - (undocumented)
        settings - (undocumented)
        Returns:
        (undocumented)
      • shutdown

        public void shutdown​(ActorSystem<?> system,
                             java.time.Duration duration,
                             boolean throwIfShutdownTimesOut)
        Shutdown the given actor system and wait up to duration for shutdown to complete.
        Parameters:
        throwIfShutdownTimesOut - Fail the test if the system fails to shut down, if false an error is printed to stdout when the system did not shutdown but no exception is thrown.
        system - (undocumented)
        duration - (undocumented)
      • shutdown

        public void shutdown​(ActorSystem<?> system,
                             java.time.Duration duration)
        Shutdown the given ActorSystem and block until it shuts down, if more time than system-shutdown-default passes an exception is thrown (can be configured with throw-on-shutdown-timeout).
        Parameters:
        system - (undocumented)
        duration - (undocumented)
      • shutdown

        public void shutdown​(ActorSystem<?> system)
        Shutdown the given ActorSystem and block until it shuts down, if more time than system-shutdown-default passes an exception is thrown (can be configured with throw-on-shutdown-timeout).
        Parameters:
        system - (undocumented)