This is an automated email from the ASF dual-hosted git repository.

csantanapr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new 714c707  give more time to swift tests to run (#3721)
714c707 is described below

commit 714c707d76cf611e26b592742b93b983c2f7eb39
Author: Carlos Santana <[email protected]>
AuthorDate: Sat Jun 2 09:59:49 2018 -0400

    give more time to swift tests to run (#3721)
---
 .../scala/system/basic/WskBasicSwift3Tests.scala    |  8 +++++---
 .../test/scala/system/basic/WskUnicodeTests.scala   | 21 +++++++++++++--------
 2 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/tests/src/test/scala/system/basic/WskBasicSwift3Tests.scala 
b/tests/src/test/scala/system/basic/WskBasicSwift3Tests.scala
index 914ef92..857beb0 100644
--- a/tests/src/test/scala/system/basic/WskBasicSwift3Tests.scala
+++ b/tests/src/test/scala/system/basic/WskBasicSwift3Tests.scala
@@ -19,7 +19,7 @@ package system.basic
 
 import org.junit.runner.RunWith
 import org.scalatest.junit.JUnitRunner
-
+import scala.concurrent.duration.DurationInt
 import common.JsHelpers
 import common.TestHelpers
 import common.TestUtils
@@ -36,6 +36,8 @@ abstract class WskBasicSwift3Tests extends TestHelpers with 
WskTestHelpers with
   val wsk: BaseWsk
   val defaultAction: Some[String] = 
Some(TestUtils.getTestActionFilename("hello.swift"))
   lazy val actionKind = "swift:3.1.1"
+  val activationMaxDuration = 2.minutes
+  val activationPollDuration = 3.minutes
 
   behavior of "Swift runtime"
 
@@ -45,10 +47,10 @@ abstract class WskBasicSwift3Tests extends TestHelpers with 
WskTestHelpers with
       val file = Some(TestUtils.getTestActionFilename("niam.swift"))
 
       assetHelper.withCleaner(wsk.action, name) { (action, _) =>
-        action.create(name, file, main = Some("niam"), kind = Some(actionKind))
+        action.create(name, file, main = Some("niam"), kind = 
Some(actionKind), timeout = Some(activationMaxDuration))
       }
 
-      withActivation(wsk.activation, wsk.action.invoke(name)) { activation =>
+      withActivation(wsk.activation, wsk.action.invoke(name), totalWait = 
activationPollDuration) { activation =>
         val response = activation.response
         response.result.get.fields.get("error") shouldBe empty
         response.result.get.fields.get("greetings") should 
be(Some(JsString("Hello from a non-standard entrypoint.")))
diff --git a/tests/src/test/scala/system/basic/WskUnicodeTests.scala 
b/tests/src/test/scala/system/basic/WskUnicodeTests.scala
index 8d9c42d..8fe46cc 100644
--- a/tests/src/test/scala/system/basic/WskUnicodeTests.scala
+++ b/tests/src/test/scala/system/basic/WskUnicodeTests.scala
@@ -19,7 +19,7 @@ package system.basic
 
 import org.junit.runner.RunWith
 import org.scalatest.junit.JUnitRunner
-
+import scala.concurrent.duration.DurationInt
 import common.JsHelpers
 import common.TestHelpers
 import common.TestUtils
@@ -36,6 +36,8 @@ abstract class WskUnicodeTests extends TestHelpers with 
WskTestHelpers with JsHe
 
   implicit val wskprops: common.WskProps = WskProps()
   val wsk: BaseWsk
+  val activationMaxDuration = 2.minutes
+  val activationPollDuration = 3.minutes
 
   s"$actionKind action" should "Ensure that UTF-8 in supported in source 
files, input params, logs, and output results" in withAssetCleaner(
     wskprops) { (wp, assetHelper) =>
@@ -46,16 +48,19 @@ abstract class WskUnicodeTests extends TestHelpers with 
WskTestHelpers with JsHe
         name,
         Some(TestUtils.getTestActionFilename(actionSource)),
         main = if (actionKind == "java") Some("Unicode") else None,
-        kind = Some(actionKind))
+        kind = Some(actionKind),
+        timeout = Some(activationMaxDuration))
     }
 
-    withActivation(wsk.activation, wsk.action.invoke(name, parameters = 
Map("delimiter" -> JsString("❄")))) {
-      activation =>
-        val response = activation.response
-        response.result.get.fields.get("error") shouldBe empty
-        response.result.get.fields.get("winter") should be(Some(JsString("❄ ☃ 
❄")))
+    withActivation(
+      wsk.activation,
+      wsk.action.invoke(name, parameters = Map("delimiter" -> JsString("❄"))),
+      totalWait = activationPollDuration) { activation =>
+      val response = activation.response
+      response.result.get.fields.get("error") shouldBe empty
+      response.result.get.fields.get("winter") should be(Some(JsString("❄ ☃ 
❄")))
 
-        activation.logs.toList.flatten.mkString(" ") should include("❄ ☃ ❄")
+      activation.logs.toList.flatten.mkString(" ") should include("❄ ☃ ❄")
     }
   }
 }

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to