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)
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
Override this method to do something when the whole test is terminating.
Override this method to do something when the whole test is terminating.
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.
Enrich .await()
onto all Awaitables, using remaining duration from the innermost
enclosing within
block or QueryTimeout.
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
Verify that the running node matches one of the given nodes
Call this after the all test cases have run.
Call this after the all test cases have run. NOT after every test case.
Call this before the start of the test run.
Call this before the start of the test run. NOT before every test case.
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")
All registered roles
Execute the given block of code only on the given nodes (names according
to the roleMap
).
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.
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!
Override this and return true
to assert that the
shutdown of the ActorSystem
was done properly.
(Since version 2.5.5) Use expectNoMessage instead
(Since version 2.5.5) Use expectNoMessage instead
Note: To be able to run tests with everything ignored or excluded by tags you must not use
testconductor
, or helper methods that usetestconductor
, 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.