csantanapr commented on a change in pull request #41: remove use of state in 
nodejs app
URL: 
https://github.com/apache/incubator-openwhisk-runtime-nodejs/pull/41#discussion_r196913665
 
 

 ##########
 File path: 
tests/src/test/scala/runtime/actionContainers/NodeJsActionContainerTests.scala
 ##########
 @@ -547,4 +547,42 @@ abstract class NodeJsActionContainerTests extends 
BasicActionRunnerTests with Ws
         e shouldBe empty
     })
   }
+
+  it should "allow running activations concurrently" in {
+    val (out, err) = withNodeJsContainer { c =>
+      //this action will create a log entry, and only complete once all 3 
activations have arrived and emitted logs
+      val code =
+        s"""
+           | function main(args) {
+           |     console.log("interleave me");
+           |     return new Promise(function(resolve, reject) {
+           |         setTimeout(function() {
+           |             resolve({ args: args});
+           |         }, 10000);
+           |    });
+           | }
+        """.stripMargin
+
+      c.init(initPayload(code))._1 should be(200)
+
+      val payloads = Seq(JsObject("arg1" -> JsString("value1")), 
JsObject("arg2" -> JsString("value2")))
+
+      val responses = c.runMultiple(payloads.map {
+        runPayload(_)
+      })
+      payloads.foreach { a =>
+        //responses should contain(200, Some(JsObject("args" -> a)))
 
 Review comment:
   Why is this commented?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to