+sam #3689 Make activator template of the multi-node sample
This commit is contained in:
parent
276eb0881f
commit
1a3080b7a6
12 changed files with 177 additions and 107 deletions
|
|
@ -185,20 +185,23 @@ A Multi Node Testing Example
|
|||
First we need some scaffolding to hook up the ``MultiNodeSpec`` with your favorite test framework. Lets define a trait
|
||||
``STMultiNodeSpec`` that uses ScalaTest to start and stop ``MultiNodeSpec``.
|
||||
|
||||
.. includecode:: ../../../akka-samples/akka-sample-multi-node/src/test/scala/sample/multinode/STMultiNodeSpec.scala#example
|
||||
.. includecode:: ../../../akka-samples/akka-sample-multi-node-scala/src/test/scala/sample/multinode/STMultiNodeSpec.scala#example
|
||||
|
||||
Then we need to define a configuration. Lets use two nodes ``"node1`` and ``"node2"`` and call it
|
||||
``MultiNodeSampleConfig``.
|
||||
|
||||
.. includecode:: ../../../akka-samples/akka-sample-multi-node/src/multi-jvm/scala/sample/multinode/MultiNodeSample.scala
|
||||
.. includecode:: ../../../akka-samples/akka-sample-multi-node-scala/src/multi-jvm/scala/sample/multinode/MultiNodeSample.scala
|
||||
:include: package,config
|
||||
|
||||
And then finally to the node test code. That starts the two nodes, and demonstrates a barrier, and a remote actor
|
||||
message send/receive.
|
||||
|
||||
.. includecode:: ../../../akka-samples/akka-sample-multi-node/src/multi-jvm/scala/sample/multinode/MultiNodeSample.scala
|
||||
.. includecode:: ../../../akka-samples/akka-sample-multi-node-scala/src/multi-jvm/scala/sample/multinode/MultiNodeSample.scala
|
||||
:include: package,spec
|
||||
|
||||
The easiest way to run this example yourself is to download `Typesafe Activator <http://typesafe.com/platform/getstarted>`_
|
||||
and open the tutorial named `Akka Multi-Node Testing Sample with Scala <http://typesafe.com/activator/template/akka-sample-multi-node-scala>`_.
|
||||
|
||||
Things to Keep in Mind
|
||||
======================
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue