Packages

abstract class MultiNodeSpec extends TestKit with MultiNodeSpecCallbacks

Note: To be able to run tests with everything ignored or excluded by tags you must not use testconductor, or helper methods that use testconductor, from the constructor of your test class. Otherwise the controller node might be shutdown before other nodes have completed and you will see errors like: AskTimeoutException: sending to terminated ref breaks promises. Using lazy val is fine.

Source
MultiNodeSpec.scala
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MultiNodeSpec
  2. MultiNodeSpecCallbacks
  3. TestKit
  4. TestKitBase
  5. AnyRef
  6. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MultiNodeSpec(config: MultiNodeConfig)
  2. new MultiNodeSpec(config: MultiNodeConfig, actorSystemCreator: (Config) ⇒ ActorSystem)

    Constructor for using arbitrary logic to create the actor system used in the multi node spec (the Config passed to the creator must be used in the created actor system for the multi node tests to work)

  3. new MultiNodeSpec(myself: RoleName, _system: ActorSystem, _roles: Seq[RoleName], deployments: (RoleName) ⇒ Seq[String])

Type Members

  1. class AwaitHelper[T] extends AnyRef

Abstract Value Members

  1. abstract def initialParticipants: Int

    TO BE DEFINED BY USER: Defines the number of participants required for starting the test.

    TO BE DEFINED BY USER: Defines the number of participants required for starting the test. This might not be equals to the number of nodes available to the test.

    Must be a def:

    def initialParticipants = 5

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from MultiNodeSpec to any2stringadd[MultiNodeSpec] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (MultiNodeSpec, B)
    Implicit
    This member is added by an implicit conversion from MultiNodeSpec to ArrowAssoc[MultiNodeSpec] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def afterTermination(): Unit

    Override this method to do something when the whole test is terminating.

    Override this method to do something when the whole test is terminating.

    Attributes
    protected
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def assertForDuration[A](a: ⇒ A, max: FiniteDuration, interval: Duration): A
    Definition Classes
    TestKitBase
  9. def atStartup(): Unit

    Override this method to do something when the whole test is starting up.

    Override this method to do something when the whole test is starting up.

    Attributes
    protected
  10. def attachConductor(tc: TestConductorExt): Unit
    Attributes
    protected
  11. def awaitAssert[A](a: ⇒ A, max: Duration, interval: Duration): A
    Definition Classes
    TestKitBase
  12. def awaitCond(p: ⇒ Boolean, max: Duration, interval: Duration, message: String): Unit
    Definition Classes
    TestKitBase
  13. implicit def awaitHelper[T](w: Awaitable[T]): AwaitHelper[T]

    Enrich .await() onto all Awaitables, using remaining duration from the innermost enclosing within block or QueryTimeout.

  14. def childActorOf(props: Props): ActorRef
    Definition Classes
    TestKitBase
  15. def childActorOf(props: Props, name: String): ActorRef
    Definition Classes
    TestKitBase
  16. def childActorOf(props: Props, supervisorStrategy: SupervisorStrategy): ActorRef
    Definition Classes
    TestKitBase
  17. def childActorOf(props: Props, name: String, supervisorStrategy: SupervisorStrategy): ActorRef
    Definition Classes
    TestKitBase
  18. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  19. def ensuring(cond: (MultiNodeSpec) ⇒ Boolean, msg: ⇒ Any): MultiNodeSpec
    Implicit
    This member is added by an implicit conversion from MultiNodeSpec to Ensuring[MultiNodeSpec] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: (MultiNodeSpec) ⇒ Boolean): MultiNodeSpec
    Implicit
    This member is added by an implicit conversion from MultiNodeSpec to Ensuring[MultiNodeSpec] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. def ensuring(cond: Boolean, msg: ⇒ Any): MultiNodeSpec
    Implicit
    This member is added by an implicit conversion from MultiNodeSpec to Ensuring[MultiNodeSpec] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. def ensuring(cond: Boolean): MultiNodeSpec
    Implicit
    This member is added by an implicit conversion from MultiNodeSpec to Ensuring[MultiNodeSpec] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  23. def enterBarrier(max: FiniteDuration, name: String*): Unit

    Enter the named barriers in the order given.

    Enter the named barriers in the order given. Use the remaining duration from the innermost enclosing within block or the passed max timeout.

    Note that the max timeout is scaled using Duration.dilated, which uses the configuration entry "akka.test.timefactor".

  24. def enterBarrier(name: String*): Unit

    Enter the named barriers in the order given.

    Enter the named barriers in the order given. Use the remaining duration from the innermost enclosing within block or the default BarrierTimeout.

  25. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  27. def expectMsg[T](max: FiniteDuration, hint: String, obj: T): T
    Definition Classes
    TestKitBase
  28. def expectMsg[T](max: FiniteDuration, obj: T): T
    Definition Classes
    TestKitBase
  29. def expectMsg[T](obj: T): T
    Definition Classes
    TestKitBase
  30. def expectMsgAllClassOf[T](max: FiniteDuration, obj: Class[_ <: T]*): Seq[T]
    Definition Classes
    TestKitBase
  31. def expectMsgAllClassOf[T](obj: Class[_ <: T]*): Seq[T]
    Definition Classes
    TestKitBase
  32. def expectMsgAllConformingOf[T](max: FiniteDuration, obj: Class[_ <: T]*): Seq[T]
    Definition Classes
    TestKitBase
  33. def expectMsgAllConformingOf[T](obj: Class[_ <: T]*): Seq[T]
    Definition Classes
    TestKitBase
  34. def expectMsgAllOf[T](max: FiniteDuration, obj: T*): Seq[T]
    Definition Classes
    TestKitBase
  35. def expectMsgAllOf[T](obj: T*): Seq[T]
    Definition Classes
    TestKitBase
  36. def expectMsgAnyClassOf[C](max: FiniteDuration, obj: Class[_ <: C]*): C
    Definition Classes
    TestKitBase
  37. def expectMsgAnyClassOf[C](obj: Class[_ <: C]*): C
    Definition Classes
    TestKitBase
  38. def expectMsgAnyOf[T](max: FiniteDuration, obj: T*): T
    Definition Classes
    TestKitBase
  39. def expectMsgAnyOf[T](obj: T*): T
    Definition Classes
    TestKitBase
  40. def expectMsgClass[C](max: FiniteDuration, c: Class[C]): C
    Definition Classes
    TestKitBase
  41. def expectMsgClass[C](c: Class[C]): C
    Definition Classes
    TestKitBase
  42. def expectMsgPF[T](max: Duration, hint: String)(f: PartialFunction[Any, T]): T
    Definition Classes
    TestKitBase
  43. def expectMsgType[T](max: FiniteDuration)(implicit t: ClassTag[T]): T
    Definition Classes
    TestKitBase
  44. def expectMsgType[T](implicit t: ClassTag[T]): T
    Definition Classes
    TestKitBase
  45. def expectNoMessage(): Unit
    Definition Classes
    TestKitBase
  46. def expectNoMessage(max: FiniteDuration): Unit
    Definition Classes
    TestKitBase
  47. def expectTerminated(target: ActorRef, max: Duration): Terminated
    Definition Classes
    TestKitBase
  48. def fishForMessage(max: Duration, hint: String)(f: PartialFunction[Any, Boolean]): Any
    Definition Classes
    TestKitBase
  49. def fishForSpecificMessage[T](max: Duration, hint: String)(f: PartialFunction[Any, T]): T
    Definition Classes
    TestKitBase
  50. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from MultiNodeSpec to StringFormat[MultiNodeSpec] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  51. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  52. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  53. def ignoreMsg(f: PartialFunction[Any, Boolean]): Unit
    Definition Classes
    TestKitBase
  54. def ignoreNoMsg(): Unit
    Definition Classes
    TestKitBase
  55. def injectDeployments(sys: ActorSystem, role: RoleName): Unit
    Attributes
    protected
  56. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  57. def isNode(nodes: RoleName*): Boolean

    Verify that the running node matches one of the given nodes

  58. def lastSender: ActorRef
    Definition Classes
    TestKitBase
  59. val log: LoggingAdapter
  60. def msgAvailable: Boolean
    Definition Classes
    TestKitBase
  61. final def multiNodeSpecAfterAll(): Unit

    Call this after the all test cases have run.

    Call this after the all test cases have run. NOT after every test case.

    Definition Classes
    MultiNodeSpecMultiNodeSpecCallbacks
  62. final def multiNodeSpecBeforeAll(): Unit

    Call this before the start of the test run.

    Call this before the start of the test run. NOT before every test case.

    Definition Classes
    MultiNodeSpecMultiNodeSpecCallbacks
  63. def muteDeadLetters(messageClasses: Class[_]*)(sys: ActorSystem = system): Unit
  64. val myAddress: Address
    Attributes
    protected
  65. val myself: RoleName
  66. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  67. def node(role: RoleName): ActorPath

    Query the controller for the transport address of the given node (by role name) and return that as an ActorPath for easy composition:

    Query the controller for the transport address of the given node (by role name) and return that as an ActorPath for easy composition:

    val serviceA = system.actorSelection(node("master") / "user" / "serviceA")
  68. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  69. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  70. def now: FiniteDuration
    Definition Classes
    TestKitBase
  71. def receiveN(n: Int, max: FiniteDuration): Seq[AnyRef]
    Definition Classes
    TestKitBase
  72. def receiveN(n: Int): Seq[AnyRef]
    Definition Classes
    TestKitBase
  73. def receiveOne(max: Duration): AnyRef
    Definition Classes
    TestKitBase
  74. def receiveWhile[T](max: Duration, idle: Duration, messages: Int)(f: PartialFunction[AnyRef, T]): Seq[T]
    Definition Classes
    TestKitBase
  75. def remaining: FiniteDuration
    Definition Classes
    TestKitBase
  76. def remainingOr(duration: FiniteDuration): FiniteDuration
    Definition Classes
    TestKitBase
  77. def remainingOrDefault: FiniteDuration
    Definition Classes
    TestKitBase
  78. def roles: Seq[RoleName]

    All registered roles

  79. def runOn(nodes: RoleName*)(thunk: ⇒ Unit): Unit

    Execute the given block of code only on the given nodes (names according to the roleMap).

  80. def setAutoPilot(pilot: AutoPilot): Unit
    Definition Classes
    TestKitBase
  81. def shutdown(actorSystem: ActorSystem, duration: Duration, verifySystemShutdown: Boolean): Unit
    Definition Classes
    TestKitBase
  82. def shutdownTimeout: FiniteDuration
  83. def startNewSystem(): ActorSystem

    This method starts a new ActorSystem with the same configuration as the previous one on the current node, including deployments.

    This method starts a new ActorSystem with the same configuration as the previous one on the current node, including deployments. It also creates a new TestConductor client and registers itself with the conductor so that it is possible to use barriers etc. normally after this method has been called.

    NOTICE: you MUST start a new system before trying to enter a barrier or otherwise using the TestConductor after having terminated this node’s system.

    Attributes
    protected
  84. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  85. implicit val system: ActorSystem
    Definition Classes
    TestKit → TestKitBase
  86. lazy val testActor: ActorRef
    Definition Classes
    TestKitBase
  87. def testActorName: String
    Attributes
    protected
    Definition Classes
    TestKitBase
  88. var testConductor: TestConductorExt

    Access to the barriers, failure injection, etc.

    Access to the barriers, failure injection, etc. The extension will have been started either in Conductor or Player mode when the constructor of MultiNodeSpec finishes, i.e. do not call the start*() methods yourself!

  89. def testKitSettings: TestKitSettings
    Definition Classes
    TestKitBase
  90. def toString(): String
    Definition Classes
    AnyRef → Any
  91. def unwatch(ref: ActorRef): ActorRef
    Definition Classes
    TestKitBase
  92. def verifySystemShutdown: Boolean

    Override this and return true to assert that the shutdown of the ActorSystem was done properly.

  93. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  94. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  95. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  96. def watch(ref: ActorRef): ActorRef
    Definition Classes
    TestKitBase
  97. def within[T](max: FiniteDuration)(f: ⇒ T): T
    Definition Classes
    TestKitBase
  98. def within[T](min: FiniteDuration, max: FiniteDuration)(f: ⇒ T): T
    Definition Classes
    TestKitBase
  99. def [B](y: B): (MultiNodeSpec, B)
    Implicit
    This member is added by an implicit conversion from MultiNodeSpec to ArrowAssoc[MultiNodeSpec] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Deprecated Value Members

  1. def expectNoMsg(max: FiniteDuration): Unit
    Definition Classes
    TestKitBase
    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.5) Use expectNoMessage instead

  2. def expectNoMsg(): Unit
    Definition Classes
    TestKitBase
    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.5) Use expectNoMessage instead

  3. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from MultiNodeSpecCallbacks

Inherited from TestKit

Inherited from TestKitBase

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from MultiNodeSpec to any2stringadd[MultiNodeSpec]

Inherited by implicit conversion StringFormat from MultiNodeSpec to StringFormat[MultiNodeSpec]

Inherited by implicit conversion Ensuring from MultiNodeSpec to Ensuring[MultiNodeSpec]

Inherited by implicit conversion ArrowAssoc from MultiNodeSpec to ArrowAssoc[MultiNodeSpec]

Ungrouped