iota-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tonyfaust...@apache.org
Subject [09/12] incubator-iota git commit: Adding tests to Orchestration
Date Mon, 18 Jul 2016 20:43:32 GMT
Adding tests to Orchestration


Project: http://git-wip-us.apache.org/repos/asf/incubator-iota/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-iota/commit/47a69e84
Tree: http://git-wip-us.apache.org/repos/asf/incubator-iota/tree/47a69e84
Diff: http://git-wip-us.apache.org/repos/asf/incubator-iota/diff/47a69e84

Branch: refs/heads/master
Commit: 47a69e845d8b100fc75d84ff87ffbbf8d209675f
Parents: 8722e87
Author: Barbara Gomes <barbaramaltagomes@gmail.com>
Authored: Sat Jul 16 11:59:39 2016 -0700
Committer: Barbara Gomes <barbaramaltagomes@gmail.com>
Committed: Sat Jul 16 11:59:39 2016 -0700

----------------------------------------------------------------------
 .../org/apache/iota/fey/Orchestration.scala     |   8 +-
 .../scala/org/apache/iota/fey/FeyCoreSpec.scala |   4 +
 .../apache/iota/fey/IdentifyFeyActorsSpec.scala |   6 +-
 .../org/apache/iota/fey/OrchestrationSpec.scala | 239 +++++++++++++++++++
 .../org/apache/iota/fey/Utils_JSONTest.scala    |  83 +++++++
 5 files changed, 333 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/47a69e84/fey-core/src/main/scala/org/apache/iota/fey/Orchestration.scala
----------------------------------------------------------------------
diff --git a/fey-core/src/main/scala/org/apache/iota/fey/Orchestration.scala b/fey-core/src/main/scala/org/apache/iota/fey/Orchestration.scala
index ad61a37..cb1bcae 100644
--- a/fey-core/src/main/scala/org/apache/iota/fey/Orchestration.scala
+++ b/fey-core/src/main/scala/org/apache/iota/fey/Orchestration.scala
@@ -37,7 +37,7 @@ protected class Orchestration(val name: String,
     */
   private val ensembles:HashMap[String, ActorRef] = HashMap.empty[String, ActorRef]
   private val awaitingTermination:HashMap[String, JsObject] = HashMap.empty[String, JsObject]
-  private val monitoring_actor = FEY_MONITOR.actorRef
+  val monitoring_actor = FEY_MONITOR.actorRef
 
   override def receive: Receive = {
 
@@ -55,7 +55,7 @@ protected class Orchestration(val name: String,
       log.warning(s"ACTOR DEAD ${actor.path}")
       ensembles.remove(actor.path.name)
       checkForEnsemblesWaitingTermination(actor.path.name)
-      stopIfNoOrchestrationisRunning()
+      stopIfNoEnsembleIsRunning()
 
     case GetRoutees => //Discard
 
@@ -87,10 +87,10 @@ protected class Orchestration(val name: String,
   }
 
   /**
-    * This method is called everytime the orchestration receives a terminated message.
+    * This method is called every time the orchestration receives a terminated message.
     * It will check if there is no more Ensembles running and will delete the orchestration
    */
-  private def stopIfNoOrchestrationisRunning() = {
+  private def stopIfNoEnsembleIsRunning() = {
     if (ensembles.isEmpty){
       context.parent ! STOP_EMPTY_ORCHESTRATION(guid)
     }

http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/47a69e84/fey-core/src/test/scala/org/apache/iota/fey/FeyCoreSpec.scala
----------------------------------------------------------------------
diff --git a/fey-core/src/test/scala/org/apache/iota/fey/FeyCoreSpec.scala b/fey-core/src/test/scala/org/apache/iota/fey/FeyCoreSpec.scala
index 9fa3299..d5162c1 100644
--- a/fey-core/src/test/scala/org/apache/iota/fey/FeyCoreSpec.scala
+++ b/fey-core/src/test/scala/org/apache/iota/fey/FeyCoreSpec.scala
@@ -144,4 +144,8 @@ class FeyCoreSpec extends BaseAkkaSpec  {
       monitor.expectMsgClass(1.seconds, classOf[Monitor.STOP])
     }
   }
+
+  //TODO: Test STOP_EMPTY_ORCHESTRATION
+  //TODO: Test restart
+  //TODO: Test checkpoint
 }

http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/47a69e84/fey-core/src/test/scala/org/apache/iota/fey/IdentifyFeyActorsSpec.scala
----------------------------------------------------------------------
diff --git a/fey-core/src/test/scala/org/apache/iota/fey/IdentifyFeyActorsSpec.scala b/fey-core/src/test/scala/org/apache/iota/fey/IdentifyFeyActorsSpec.scala
index 9d64441..f159d19 100644
--- a/fey-core/src/test/scala/org/apache/iota/fey/IdentifyFeyActorsSpec.scala
+++ b/fey-core/src/test/scala/org/apache/iota/fey/IdentifyFeyActorsSpec.scala
@@ -29,7 +29,7 @@ class IdentifyFeyActorsSpec extends BaseAkkaSpec {
       IdentifyFeyActors.actorsPath.size should equal(1)
     }
     s"result in path 'akka://FEY-TEST/user/$globalIdentifierName' " in {
-      IdentifyFeyActors.actorsPath should contain(s"akka://FEY-TEST/user/$globalIdentifierName")
+      IdentifyFeyActors.actorsPath should contain(s"akka://$systemName/user/$globalIdentifierName")
     }
   }
 
@@ -43,8 +43,8 @@ class IdentifyFeyActorsSpec extends BaseAkkaSpec {
       IdentifyFeyActors.actorsPath.size should equal(2)
     }
     s"result in matching paths" in {
-      IdentifyFeyActors.actorsPath should contain(s"akka://FEY-TEST/user/$globalIdentifierName")
-      IdentifyFeyActors.actorsPath should contain("akka://FEY-TEST/user/MONITOR")
+      IdentifyFeyActors.actorsPath should contain(s"akka://$systemName/user/$globalIdentifierName")
+      IdentifyFeyActors.actorsPath should contain(s"akka://$systemName/user/MONITOR")
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/47a69e84/fey-core/src/test/scala/org/apache/iota/fey/OrchestrationSpec.scala
----------------------------------------------------------------------
diff --git a/fey-core/src/test/scala/org/apache/iota/fey/OrchestrationSpec.scala b/fey-core/src/test/scala/org/apache/iota/fey/OrchestrationSpec.scala
new file mode 100644
index 0000000..4301772
--- /dev/null
+++ b/fey-core/src/test/scala/org/apache/iota/fey/OrchestrationSpec.scala
@@ -0,0 +1,239 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.iota.fey
+
+import play.api.libs.json._
+import akka.actor.{ActorRef, PoisonPill, Props}
+import akka.testkit.{EventFilter, TestActorRef, TestProbe}
+
+import scala.concurrent.duration.DurationInt
+
+class OrchestrationSpec extends BaseAkkaSpec{
+
+  val parent = TestProbe("ORCHESTRATION")
+  val orchName = "ORCHESTRATION-TEST"
+  val monitor = TestProbe()
+  val orchRef = TestActorRef[Orchestration]( Props(new Orchestration("TESTING",orchName,"123124324324"){
+    override val monitoring_actor = monitor.ref
+  }), parent.ref, orchName)
+
+  val orchestrationJson = getJSValueFromString(Utils_JSONTest.create_json_test)
+  val ensembles = (orchestrationJson \ JSON_PATH.ENSEMBLES).as[List[JsObject]]
+  val ensemble1 = ensembles(0)
+  val ensemble2 = ensembles(1)
+  var ensemble1ref:ActorRef = _
+  var ensemble2ref:ActorRef = _
+
+  "Creating an Orchestration " should {
+    "result in sending START message to Monitor actor" in {
+      monitor.expectMsgClass(1.seconds, classOf[Monitor.START])
+    }
+    "result in one paths added to IdentifyFeyActors.actorsPath" in{
+      globalIdentifierRef ! IdentifyFeyActors.IDENTIFY_TREE(parent.ref.path.toString)
+      Thread.sleep(500)
+      IdentifyFeyActors.actorsPath should have size(1)
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName")
+    }
+  }
+
+  "Sending Orchestration.CREATE_ENSEMBLES to Orchestration" should {
+   s"result in creation of Ensemble '${(ensemble1 \ JSON_PATH.GUID).as[String]}'" in {
+      orchRef ! Orchestration.CREATE_ENSEMBLES(ensembles)
+      ensemble1ref = TestProbe().expectActor(s"${orchRef.path}/${(ensemble1 \ JSON_PATH.GUID).as[String]}")
+    }
+    s"result in creation of Ensemble '${(ensemble2 \ JSON_PATH.GUID).as[String]}'" in {
+      ensemble2ref = TestProbe().expectActor(s"${orchRef.path}/${(ensemble2 \ JSON_PATH.GUID).as[String]}")
+    }
+    s"result in creation of two Performers" in {
+      TestProbe().expectActor(s"${orchRef.path}/${(ensemble2 \ JSON_PATH.GUID).as[String]}/TEST-0001")
+      TestProbe().expectActor(s"${orchRef.path}/${(ensemble1 \ JSON_PATH.GUID).as[String]}/TEST-0001")
+    }
+    s"result in two entries in ORCHESTRATION_CACHE.orchestration_metadata for $orchName"
in {
+      ORCHESTRATION_CACHE.orchestration_metadata should contain key(orchName)
+      ORCHESTRATION_CACHE.orchestration_metadata.get(orchName).get should have size(2)
+    }
+    s"result in right entry in ORCHESTRATION_CACHE.orchestration_metadata for $orchName and
${(ensemble1 \ JSON_PATH.GUID).as[String]}" in {
+      ORCHESTRATION_CACHE.orchestration_metadata.get(orchName).get should contain key((ensemble1
\ JSON_PATH.GUID).as[String])
+      ORCHESTRATION_CACHE.orchestration_metadata
+        .get(orchName).get
+        .get((ensemble1 \ JSON_PATH.GUID).as[String]).get should equal(ensemble1)
+    }
+    s"result in right entry in ORCHESTRATION_CACHE.orchestration_metadata for $orchName and
${(ensemble2 \ JSON_PATH.GUID).as[String]}" in {
+      ORCHESTRATION_CACHE.orchestration_metadata.get(orchName).get should contain key((ensemble2
\ JSON_PATH.GUID).as[String])
+      ORCHESTRATION_CACHE.orchestration_metadata
+        .get(orchName).get
+        .get((ensemble2 \ JSON_PATH.GUID).as[String]).get should equal(ensemble2)
+    }
+    "result in five paths added to IdentifyFeyActors.actorsPath" in{
+      globalIdentifierRef ! IdentifyFeyActors.IDENTIFY_TREE(parent.ref.path.toString)
+      Thread.sleep(500)
+      IdentifyFeyActors.actorsPath should have size(5)
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0001")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0001/TEST-0001")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0002")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0002/TEST-0001")
+    }
+  }
+
+  "Sending Orchestration.CREATE_ENSEMBLES to Orchestration with the same previous created
Ensembles" should {
+    s"result in logging 'already exists' at Warn " in {
+      EventFilter.warning(pattern = "^Ensembles.*already exists", occurrences = 2) intercept
{
+        orchRef ! Orchestration.CREATE_ENSEMBLES(ensembles)
+      }
+    }
+  }
+
+  val orch2Name = "TEST-ORCH-2"
+  var orch2ref: ActorRef = _
+  var orch2ens: ActorRef = _
+  val orchestration2Json = getJSValueFromString(Utils_JSONTest.orchestration_test_json)
+  val orch2ensembles = (orchestration2Json \ JSON_PATH.ENSEMBLES).as[List[JsObject]]
+  val orch2ensemble1 = orch2ensembles(0)
+  val monitor2 = TestProbe()
+
+  "Creating a second Orchestration" should {
+    s"result in sending START message to Monitor actor" in {
+      orch2ref = TestActorRef[Orchestration]( Props(new Orchestration("TESTING",orch2Name,"123124324324"){
+        override val monitoring_actor = monitor2.ref
+      }), parent.ref, orch2Name)
+      monitor2.expectMsgClass(1.seconds, classOf[Monitor.START])
+    }
+    "result in six paths added to IdentifyFeyActors.actorsPath" in{
+      globalIdentifierRef ! IdentifyFeyActors.IDENTIFY_TREE(parent.ref.path.toString)
+      Thread.sleep(500)
+      IdentifyFeyActors.actorsPath should have size(6)
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0001")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0001/TEST-0001")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0002")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0002/TEST-0001")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orch2Name")
+    }
+  }
+
+  "Sending Orchestration.CREATE_ENSEMBLES to the second Orchestration" should {
+    s"result in creation of Ensemble '${(orch2ensemble1 \ JSON_PATH.GUID).as[String]}'" in
{
+      orch2ref ! Orchestration.CREATE_ENSEMBLES(orch2ensembles)
+      orch2ens = TestProbe().expectActor(s"${orch2ref.path}/${(orch2ensemble1 \ JSON_PATH.GUID).as[String]}")
+    }
+    s"result in creation of one Performers" in {
+      TestProbe().expectActor(s"${orch2ref.path}/${(orch2ensemble1 \ JSON_PATH.GUID).as[String]}/TEST-0001")
+    }
+    s"result in one entries in ORCHESTRATION_CACHE.orchestration_metadata for $orch2Name"
in {
+      ORCHESTRATION_CACHE.orchestration_metadata should contain key(orch2Name)
+      ORCHESTRATION_CACHE.orchestration_metadata.get(orch2Name).get should have size(1)
+    }
+    s"result in right entry in ORCHESTRATION_CACHE.orchestration_metadata for $orch2Name
and ${(orch2ensemble1 \ JSON_PATH.GUID).as[String]}" in {
+      ORCHESTRATION_CACHE.orchestration_metadata.get(orch2Name).get should contain key((orch2ensemble1
\ JSON_PATH.GUID).as[String])
+      ORCHESTRATION_CACHE.orchestration_metadata
+        .get(orch2Name).get
+        .get((orch2ensemble1 \ JSON_PATH.GUID).as[String]).get should equal(orch2ensemble1)
+    }
+    "result in eight paths added to IdentifyFeyActors.actorsPath" in{
+      globalIdentifierRef ! IdentifyFeyActors.IDENTIFY_TREE(parent.ref.path.toString)
+      Thread.sleep(500)
+      IdentifyFeyActors.actorsPath should have size(8)
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0001")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0001/TEST-0001")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0002")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0002/TEST-0001")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orch2Name")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orch2Name/MY-ENSEMBLE-0001")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orch2Name/MY-ENSEMBLE-0001/TEST-0001")
+    }
+  }
+
+  "Sending Orchestration.DELETE_ENSEMBLES to the second Orchestration" should {
+    "result in termination of ensembles and the Orchestration itself" in {
+      orch2ref ! Orchestration.DELETE_ENSEMBLES(orch2ensembles)
+      TestProbe().verifyActorTermination(orch2ens)
+    }
+    s"result in sending TERMINATED message to Monitor actor" in {
+      monitor2.expectMsgAllClassOf(classOf[Monitor.TERMINATE])
+    }
+    s"result in FeyCore.STOP_EMPTY_ORCHESTRATION triggered by $orch2Name to parent" in {
+      parent.expectMsg(FeyCore.STOP_EMPTY_ORCHESTRATION(orch2Name))
+    }
+    "result in six paths added to IdentifyFeyActors.actorsPath" in{
+      globalIdentifierRef ! IdentifyFeyActors.IDENTIFY_TREE(parent.ref.path.toString)
+      Thread.sleep(500)
+      IdentifyFeyActors.actorsPath should have size(6)
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0001")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0001/TEST-0001")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0002")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0002/TEST-0001")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orch2Name")
+    }
+  }
+
+  "Stopping second Orchestration" should {
+    s"result in sending STOP message to Monitor actor" in {
+      orch2ref ! PoisonPill
+      monitor2.expectMsgAllClassOf(classOf[Monitor.STOP])
+    }
+  }
+
+  "Sending Orchestration.UPDATE_ENSEMBLES with Ensemble that does not exist" should {
+    s"result in logging 'no Ensemble' at Warn " in {
+      EventFilter.warning(pattern = s"^There is no Ensemble.*$orchName", occurrences = 1)
intercept {
+        val updateEnsemble = (getJSValueFromString(Utils_JSONTest.orchestration_update2_test_json)
\ JSON_PATH.ENSEMBLES).as[List[JsObject]]
+        orchRef ! Orchestration.UPDATE_ENSEMBLES(updateEnsemble)
+      }
+    }
+  }
+
+  "Sending Orchestration.UPDATE_ENSEMBLES to Orchestration" should {
+    val updateEnsemble = (getJSValueFromString(Utils_JSONTest.orchestration_update_test_json)
\ JSON_PATH.ENSEMBLES).as[List[JsObject]]
+    s"result in termination of Ensemble '$orchName/MY-ENSEMBLE-0001'" in {
+      orchRef ! Orchestration.UPDATE_ENSEMBLES(updateEnsemble)
+      TestProbe().verifyActorTermination(ensemble1ref)
+    }
+    s"result in termination of '$orchName/MY-ENSEMBLE-0001/TEST-0001'" in {
+      TestProbe().notExpectActor(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0001/TEST-0001")
+    }
+    s"result in creation of two new performers" in {
+      TestProbe().expectActor(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0001/TEST-0004")
+      TestProbe().expectActor(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0001/TEST-0005")
+    }
+    "result in six paths added to IdentifyFeyActors.actorsPath" in{
+      globalIdentifierRef ! IdentifyFeyActors.IDENTIFY_TREE(parent.ref.path.toString)
+      Thread.sleep(500)
+      IdentifyFeyActors.actorsPath should have size(6)
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0001")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0001/TEST-0005")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0001/TEST-0004")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0002")
+      IdentifyFeyActors.actorsPath should contain(s"${parent.ref.path}/$orchName/MY-ENSEMBLE-0002/TEST-0001")
+    }
+    s"result in right entry in ORCHESTRATION_CACHE.orchestration_metadata for $orchName and
${(ensemble1 \ JSON_PATH.GUID).as[String]}" in {
+      ORCHESTRATION_CACHE.orchestration_metadata.get(orchName).get should contain key((ensemble1
\ JSON_PATH.GUID).as[String])
+      ORCHESTRATION_CACHE.orchestration_metadata
+        .get(orchName).get
+        .get((ensemble1 \ JSON_PATH.GUID).as[String]).get should equal(updateEnsemble(0))
+    }
+  }
+
+  //TODO: Test restart
+  //TODO: Test ensembles val in orchRef.underlyingActor
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/47a69e84/fey-core/src/test/scala/org/apache/iota/fey/Utils_JSONTest.scala
----------------------------------------------------------------------
diff --git a/fey-core/src/test/scala/org/apache/iota/fey/Utils_JSONTest.scala b/fey-core/src/test/scala/org/apache/iota/fey/Utils_JSONTest.scala
index e65aafc..5be25c4 100644
--- a/fey-core/src/test/scala/org/apache/iota/fey/Utils_JSONTest.scala
+++ b/fey-core/src/test/scala/org/apache/iota/fey/Utils_JSONTest.scala
@@ -184,4 +184,87 @@ object Utils_JSONTest {
        ]
      }"""
 
+  val orchestration_test_json =
+    """{
+       "guid" : "TEST-ORCH-2",
+       "command" : "CREATE",
+       "timestamp": "213263914979",
+       "name" : "ORCHESTRATION FOR TEST",
+       "ensembles" : [
+         {
+           "guid":"MY-ENSEMBLE-0001",
+           "command": "NONE",
+           "performers":[
+             {
+               "guid": "TEST-0001",
+               "schedule": 0,
+               "backoff": 0,
+               "source": {
+                 "name": "fey-test-actor.jar",
+                 "classPath": "org.apache.iota.fey.TestActor",
+                 "parameters": {}
+               }
+             }
+           ],
+           "connections":[]
+         }
+       ]
+     }"""
+
+  val orchestration_update_test_json =
+    """{
+       "ensembles" : [
+         {
+           "guid":"MY-ENSEMBLE-0001",
+           "command": "UPDATE",
+           "performers":[
+             {
+               "guid": "TEST-0004",
+               "schedule": 0,
+               "backoff": 0,
+               "source": {
+                 "name": "fey-test-actor.jar",
+                 "classPath": "org.apache.iota.fey.TestActor",
+                 "parameters": {}
+               }
+             },
+             {
+               "guid": "TEST-0005",
+               "schedule": 0,
+               "backoff": 0,
+               "source": {
+                 "name": "fey-test-actor.jar",
+                 "classPath": "org.apache.iota.fey.TestActor",
+                 "parameters": {}
+               }
+             }
+           ],
+           "connections":[]
+         }
+       ]
+     }"""
+
+  val orchestration_update2_test_json =
+    """{
+       "ensembles" : [
+         {
+           "guid":"MY-ENSEMBLE-0005",
+           "command": "UPDATE",
+           "performers":[
+             {
+               "guid": "TEST-0004",
+               "schedule": 0,
+               "backoff": 0,
+               "source": {
+                 "name": "fey-test-actor.jar",
+                 "classPath": "org.apache.iota.fey.TestActor",
+                 "parameters": {}
+               }
+             }
+           ],
+           "connections":[]
+         }
+       ]
+     }"""
+
 }


Mime
View raw message