openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [incubator-openwhisk] branch master updated: Settle throttle before running the API GW Tests (#4496)
Date Tue, 11 Jun 2019 03:26:59 GMT
This is an automated email from the ASF dual-hosted git repository.

dubeejw pushed a commit to branch master
in repository

The following commit(s) were added to refs/heads/master by this push:
     new da61ad2  Settle throttle before running the API GW Tests (#4496)
da61ad2 is described below

commit da61ad2593ee9473bef906cd1aa004efdb853861
Author: Martin Henke <>
AuthorDate: Tue Jun 11 05:26:44 2019 +0200

    Settle throttle before running the API GW Tests (#4496)
    * simplify throttle code
    * revert to original throttle algorithm
    * Make the waiting time to calm down the thottle explicit
 tests/src/test/scala/apigw/healthtests/ApiGwEndToEndTests.scala      | 5 +----
 .../scala/org/apache/openwhisk/core/cli/test/BaseApiGwTests.scala    | 5 +++++
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/src/test/scala/apigw/healthtests/ApiGwEndToEndTests.scala b/tests/src/test/scala/apigw/healthtests/ApiGwEndToEndTests.scala
index 186e561..7f7c23e 100644
--- a/tests/src/test/scala/apigw/healthtests/ApiGwEndToEndTests.scala
+++ b/tests/src/test/scala/apigw/healthtests/ApiGwEndToEndTests.scala
@@ -22,21 +22,18 @@ import
 import scala.concurrent.duration.DurationInt
 import org.junit.runner.RunWith
 import org.scalatest.BeforeAndAfterAll
 import org.scalatest.FlatSpec
 import org.scalatest.Matchers
 import org.scalatest.junit.JUnitRunner
-import io.restassured.RestAssured
 import common.TestHelpers
 import common.TestUtils
 import common.TestUtils._
 import common.WskOperations
 import common.WskProps
 import common.WskTestHelpers
+import io.restassured.RestAssured
 import spray.json._
 import spray.json.DefaultJsonProtocol._
diff --git a/tests/src/test/scala/org/apache/openwhisk/core/cli/test/BaseApiGwTests.scala
index 1a74f01..dc30f1b 100644
--- a/tests/src/test/scala/org/apache/openwhisk/core/cli/test/BaseApiGwTests.scala
+++ b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/BaseApiGwTests.scala
@@ -89,6 +89,11 @@ abstract class BaseApiGwTests extends TestHelpers with WskTestHelpers with
    * Create a CLI properties file for use by the tests
   override def beforeAll() = {
+    //Wait a while to settle the throttle so that the status of throttle algorithm implemented
in checkThrottle
+    //is consistent with the reality
+    //Without this waiting time API Tests do fail very consistently on faster build machines
+    //In the longer run the APIGW tests should be moved to a separate namespace
+    Thread.sleep(60.seconds.toMillis)
     val wskprops = WskProps(token = "SOME TOKEN")

View raw message