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

cbickel 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 ab1c453  Bump timeout of activation logs test. (#3554)
ab1c453 is described below

commit ab1c45389d2565531039dcc15b5193ddcbe50992
Author: Markus Thömmes <markusthoem...@me.com>
AuthorDate: Tue Apr 24 16:08:57 2018 +0200

    Bump timeout of activation logs test. (#3554)
    
    * Bump timeout of activation logs test.
    
    There are SPIs in active development which exchange the backend of the 
"activation logs" call. This backend is not necessarily consistent with the 
activations database itself, hence the test needs to poll "activation logs" for 
a set amount of time.
    
    * Align timeout.
---
 .../src/test/scala/system/basic/WskActivationTests.scala  | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/tests/src/test/scala/system/basic/WskActivationTests.scala 
b/tests/src/test/scala/system/basic/WskActivationTests.scala
index 06ce382..7adc5fa 100644
--- a/tests/src/test/scala/system/basic/WskActivationTests.scala
+++ b/tests/src/test/scala/system/basic/WskActivationTests.scala
@@ -20,14 +20,14 @@ package system.basic
 import org.junit.runner.RunWith
 import org.scalatest.junit.JUnitRunner
 
-import common.{BaseWsk, JsHelpers, TestHelpers, TestUtils, WskProps, 
WskTestHelpers}
+import common.{BaseWsk, TestHelpers, TestUtils, WskProps, WskTestHelpers}
 
 import whisk.utils.retry
 
 import scala.concurrent.duration._
 
 @RunWith(classOf[JUnitRunner])
-abstract class WskActivationTests extends TestHelpers with WskTestHelpers with 
JsHelpers {
+abstract class WskActivationTests extends TestHelpers with WskTestHelpers {
   implicit val wskprops = WskProps()
 
   val wsk: BaseWsk
@@ -44,14 +44,17 @@ abstract class WskActivationTests extends TestHelpers with 
WskTestHelpers with J
 
     val run = wsk.action.invoke(name, blocking = true)
 
-    // Use withActivation() to reduce intermittent failures that may result 
from eventually consistent DBs
+    // Even though the activation was blocking, the activation itself might 
not have appeared in the database.
     withActivation(wsk.activation, run) { activation =>
+      // Needs to be retried because there might be an SPI being plugged in 
which is handling logs not consistent with
+      // the database where the activation itself comes from (activation in 
CouchDB, logs in Elasticsearch for
+      // example).
       retry({
         val logs = wsk.activation.logs(Some(activation.activationId)).stdout
 
-        logs should include regex (logFormat.format("stdout", "this is 
stdout"))
-        logs should include regex (logFormat.format("stderr", "this is 
stderr"))
-      }, 10, Some(1.second))
+        logs should include regex logFormat.format("stdout", "this is stdout")
+        logs should include regex logFormat.format("stderr", "this is stderr")
+      }, 60 * 5, Some(1.second)) // retry for 5 minutes
     }
   }
 }

-- 
To stop receiving notification emails like this one, please contact
cbic...@apache.org.

Reply via email to