Class/Object

akka.remote.testkit

MultiNodeSpec

Related Docs: object MultiNodeSpec | package testkit

Permalink

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
Linear Supertypes
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)

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

    Permalink

    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])

    Permalink

Type Members

  1. class AwaitHelper[T] extends AnyRef

    Permalink

Abstract Value Members

  1. abstract def initialParticipants: Int

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    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)

    Permalink
    Implicit information
    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

    Permalink
    Definition Classes
    AnyRef → Any
  6. def afterTermination(): Unit

    Permalink

    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

    Permalink
    Definition Classes
    Any
  8. def atStartup(): Unit

    Permalink

    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
  9. def attachConductor(tc: TestConductorExt): Unit

    Permalink
    Attributes
    protected
  10. def awaitAssert[A](a: ⇒ A, max: Duration, interval: Duration): A

    Permalink
    Definition Classes
    TestKitBase
  11. def awaitCond(p: ⇒ Boolean, max: Duration, interval: Duration, message: String): Unit

    Permalink
    Definition Classes
    TestKitBase
  12. implicit def awaitHelper[T](w: Awaitable[T]): AwaitHelper[T]

    Permalink

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

  13. def childActorOf(props: Props): ActorRef

    Permalink
    Definition Classes
    TestKitBase
  14. def childActorOf(props: Props, name: String): ActorRef

    Permalink
    Definition Classes
    TestKitBase
  15. def childActorOf(props: Props, supervisorStrategy: SupervisorStrategy): ActorRef

    Permalink
    Definition Classes
    TestKitBase
  16. def childActorOf(props: Props, name: String, supervisorStrategy: SupervisorStrategy): ActorRef

    Permalink
    Definition Classes
    TestKitBase
  17. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. def ensuring(cond: (MultiNodeSpec) ⇒ Boolean, msg: ⇒ Any): MultiNodeSpec

    Permalink
    Implicit information
    This member is added by an implicit conversion from MultiNodeSpec to Ensuring[MultiNodeSpec] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. def ensuring(cond: (MultiNodeSpec) ⇒ Boolean): MultiNodeSpec

    Permalink
    Implicit information
    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: Boolean, msg: ⇒ Any): MultiNodeSpec

    Permalink
    Implicit information
    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): MultiNodeSpec

    Permalink
    Implicit information
    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 enterBarrier(name: String*): Unit

    Permalink

    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

  23. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  25. def expectMsg[T](max: FiniteDuration, hint: String, obj: T): T

    Permalink
    Definition Classes
    TestKitBase
  26. def expectMsg[T](max: FiniteDuration, obj: T): T

    Permalink
    Definition Classes
    TestKitBase
  27. def expectMsg[T](obj: T): T

    Permalink
    Definition Classes
    TestKitBase
  28. def expectMsgAllClassOf[T](max: FiniteDuration, obj: Class[_ <: T]*): Seq[T]

    Permalink
    Definition Classes
    TestKitBase
  29. def expectMsgAllClassOf[T](obj: Class[_ <: T]*): Seq[T]

    Permalink
    Definition Classes
    TestKitBase
  30. def expectMsgAllConformingOf[T](max: FiniteDuration, obj: Class[_ <: T]*): Seq[T]

    Permalink
    Definition Classes
    TestKitBase
  31. def expectMsgAllConformingOf[T](obj: Class[_ <: T]*): Seq[T]

    Permalink
    Definition Classes
    TestKitBase
  32. def expectMsgAllOf[T](max: FiniteDuration, obj: T*): Seq[T]

    Permalink
    Definition Classes
    TestKitBase
  33. def expectMsgAllOf[T](obj: T*): Seq[T]

    Permalink
    Definition Classes
    TestKitBase
  34. def expectMsgAnyClassOf[C](max: FiniteDuration, obj: Class[_ <: C]*): C

    Permalink
    Definition Classes
    TestKitBase
  35. def expectMsgAnyClassOf[C](obj: Class[_ <: C]*): C

    Permalink
    Definition Classes
    TestKitBase
  36. def expectMsgAnyOf[T](max: FiniteDuration, obj: T*): T

    Permalink
    Definition Classes
    TestKitBase
  37. def expectMsgAnyOf[T](obj: T*): T

    Permalink
    Definition Classes
    TestKitBase
  38. def expectMsgClass[C](max: FiniteDuration, c: Class[C]): C

    Permalink
    Definition Classes
    TestKitBase
  39. def expectMsgClass[C](c: Class[C]): C

    Permalink
    Definition Classes
    TestKitBase
  40. def expectMsgPF[T](max: Duration, hint: String)(f: PartialFunction[Any, T]): T

    Permalink
    Definition Classes
    TestKitBase
  41. def expectMsgType[T](max: FiniteDuration)(implicit t: ClassTag[T]): T

    Permalink
    Definition Classes
    TestKitBase
  42. def expectMsgType[T](implicit t: ClassTag[T]): T

    Permalink
    Definition Classes
    TestKitBase
  43. def expectNoMessage(): Unit

    Permalink
    Definition Classes
    TestKitBase
  44. def expectNoMessage(max: FiniteDuration): Unit

    Permalink
    Definition Classes
    TestKitBase
  45. def expectTerminated(target: ActorRef, max: Duration): Terminated

    Permalink
    Definition Classes
    TestKitBase
  46. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  47. def fishForMessage(max: Duration, hint: String)(f: PartialFunction[Any, Boolean]): Any

    Permalink
    Definition Classes
    TestKitBase
  48. def fishForSpecificMessage[T](max: Duration, hint: String)(f: PartialFunction[Any, T]): T

    Permalink
    Definition Classes
    TestKitBase
  49. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    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()
  50. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  51. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  52. def ignoreMsg(f: PartialFunction[Any, Boolean]): Unit

    Permalink
    Definition Classes
    TestKitBase
  53. def ignoreNoMsg(): Unit

    Permalink
    Definition Classes
    TestKitBase
  54. def injectDeployments(sys: ActorSystem, role: RoleName): Unit

    Permalink
    Attributes
    protected
  55. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  56. def isNode(nodes: RoleName*): Boolean

    Permalink

    Verify that the running node matches one of the given nodes

  57. def lastSender: ActorRef

    Permalink
    Definition Classes
    TestKitBase
  58. val log: LoggingAdapter

    Permalink
  59. def msgAvailable: Boolean

    Permalink
    Definition Classes
    TestKitBase
  60. final def multiNodeSpecAfterAll(): Unit

    Permalink

    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
  61. final def multiNodeSpecBeforeAll(): Unit

    Permalink

    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
  62. def muteDeadLetters(messageClasses: Class[_]*)(sys: ActorSystem = system): Unit

    Permalink
  63. val myAddress: Address

    Permalink
    Attributes
    protected
  64. val myself: RoleName

    Permalink
  65. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  66. def node(role: RoleName): ActorPath

    Permalink

    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")
  67. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  68. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  69. def now: FiniteDuration

    Permalink
    Definition Classes
    TestKitBase
  70. def receiveN(n: Int, max: FiniteDuration): Seq[AnyRef]

    Permalink
    Definition Classes
    TestKitBase
  71. def receiveN(n: Int): Seq[AnyRef]

    Permalink
    Definition Classes
    TestKitBase
  72. def receiveOne(max: Duration): AnyRef

    Permalink
    Definition Classes
    TestKitBase
  73. def receiveWhile[T](max: Duration, idle: Duration, messages: Int)(f: PartialFunction[AnyRef, T]): Seq[T]

    Permalink
    Definition Classes
    TestKitBase
  74. def remaining: FiniteDuration

    Permalink
    Definition Classes
    TestKitBase
  75. def remainingOr(duration: FiniteDuration): FiniteDuration

    Permalink
    Definition Classes
    TestKitBase
  76. def remainingOrDefault: FiniteDuration

    Permalink
    Definition Classes
    TestKitBase
  77. def roles: Seq[RoleName]

    Permalink

    All registered roles

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

    Permalink

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

  79. def setAutoPilot(pilot: AutoPilot): Unit

    Permalink
    Definition Classes
    TestKitBase
  80. def shutdown(actorSystem: ActorSystem, duration: Duration, verifySystemShutdown: Boolean): Unit

    Permalink
    Definition Classes
    TestKitBase
  81. def shutdownTimeout: FiniteDuration

    Permalink
  82. def startNewSystem(): ActorSystem

    Permalink

    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
  83. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  84. implicit val system: ActorSystem

    Permalink
    Definition Classes
    TestKit → TestKitBase
  85. val testActor: ActorRef

    Permalink
    Definition Classes
    TestKitBase
  86. def testActorName: String

    Permalink
    Attributes
    protected
    Definition Classes
    TestKitBase
  87. var testConductor: TestConductorExt

    Permalink

    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!

  88. val testKitSettings: TestKitSettings

    Permalink
    Definition Classes
    TestKitBase
  89. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  90. def unwatch(ref: ActorRef): ActorRef

    Permalink
    Definition Classes
    TestKitBase
  91. def verifySystemShutdown: Boolean

    Permalink

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

  92. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  93. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  94. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  95. def watch(ref: ActorRef): ActorRef

    Permalink
    Definition Classes
    TestKitBase
  96. def within[T](max: FiniteDuration)(f: ⇒ T): T

    Permalink
    Definition Classes
    TestKitBase
  97. def within[T](min: FiniteDuration, max: FiniteDuration)(f: ⇒ T): T

    Permalink
    Definition Classes
    TestKitBase
  98. def [B](y: B): (MultiNodeSpec, B)

    Permalink
    Implicit information
    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

    Permalink
    Definition Classes
    TestKitBase
    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.5) Use expectNoMessage instead

  2. def expectNoMsg(): Unit

    Permalink
    Definition Classes
    TestKitBase
    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.5) Use expectNoMessage instead

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