Class ActorTestKit$
- java.lang.Object
-
- akka.actor.testkit.typed.scaladsl.ActorTestKit$
-
public class ActorTestKit$ extends java.lang.Object
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 theActorSystem
and the testkit withActorTestKit.shutdownTestKit()
.
-
-
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
apply()
ActorTestKit
apply(java.lang.String name)
Create a named testkit.ActorTestKit
apply(java.lang.String name, com.typesafe.config.Config customConfig)
Create a named testkit, and use a custom config for the actor system.ActorTestKit
apply(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 customTestKitSettings
void
shutdown(ActorSystem<?> system)
Shutdown the givenActorSystem
and block until it shuts down, if more time thanTestKitSettings.DefaultActorSystemShutdownTimeout
passes an exception is thrownvoid
shutdown(ActorSystem<?> system, scala.concurrent.duration.Duration timeout, boolean throwIfShutdownFails)
Shutdown the givenActorSystem
and block until it shuts down or theduration
hits.boolean
shutdown$default$3()
-
-
-
Field Detail
-
MODULE$
public static final ActorTestKit$ MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Method Detail
-
apply
public ActorTestKit apply()
-
apply
public ActorTestKit apply(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 theActorSystem
and the testkit withActorTestKit.shutdownTestKit()
.- Parameters:
name
- (undocumented)- Returns:
- (undocumented)
-
apply
public ActorTestKit apply(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 theActorSystem
and the testkit withActorTestKit.shutdownTestKit()
.- Parameters:
name
- (undocumented)customConfig
- (undocumented)- Returns:
- (undocumented)
-
apply
public ActorTestKit apply(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 customTestKitSettings
It will create an
ActorSystem
with this name, e.g. threads will include the name. When the test has completed you should terminate theActorSystem
and the testkit withActorTestKit.shutdownTestKit()
.- Parameters:
name
- (undocumented)customConfig
- (undocumented)settings
- (undocumented)- Returns:
- (undocumented)
-
shutdown
public void shutdown(ActorSystem<?> system)
Shutdown the givenActorSystem
and block until it shuts down, if more time thanTestKitSettings.DefaultActorSystemShutdownTimeout
passes an exception is thrown- Parameters:
system
- (undocumented)
-
shutdown
public void shutdown(ActorSystem<?> system, scala.concurrent.duration.Duration timeout, boolean throwIfShutdownFails)
Shutdown the givenActorSystem
and block until it shuts down or theduration
hits. If the timeout hitsverifySystemShutdown
decides- Parameters:
system
- (undocumented)timeout
- (undocumented)throwIfShutdownFails
- (undocumented)
-
shutdown$default$3
public boolean shutdown$default$3()
-
-