You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/02/26 20:38:15 UTC

[GitHub] dubeejw closed pull request #251: More test improvements

dubeejw closed pull request #251: More test improvements
URL: https://github.com/apache/incubator-openwhisk-package-kafka/pull/251
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tests/src/test/scala/system/health/BasicHealthTest.scala b/tests/src/test/scala/system/health/BasicHealthTest.scala
index 52b176d..02183d2 100644
--- a/tests/src/test/scala/system/health/BasicHealthTest.scala
+++ b/tests/src/test/scala/system/health/BasicHealthTest.scala
@@ -87,8 +87,14 @@ class BasicHealthTest
         activation =>
           // should be successful
           activation.response.success shouldBe true
+
+          // It takes a moment for the consumer to fully initialize.
+          println("Giving the consumer a moment to get ready")
+          Thread.sleep(consumerInitTime)
+
           val uuid = activation.response.result.get.fields.get("uuid").get.toString().replaceAll("\"", "")
 
+          println("Checking health endpoint(s) for existence of consumer uuid")
           // get /health endpoint(s) and ensure it contains the new uuid
           val healthUrls = System.getProperty("health_url").split("\\s*,\\s*").filterNot(_.isEmpty)
           healthUrls shouldNot be(empty)
@@ -111,7 +117,7 @@ class BasicHealthTest
 
             uuids should contain(uuid)
 
-          }, N = 3, waitBeforeRetry = Some(1.second))
+          }, N = 10, waitBeforeRetry = Some(1.second))
       }
   }
 
diff --git a/tests/src/test/scala/system/packages/MessageHubProduceTests.scala b/tests/src/test/scala/system/packages/MessageHubProduceTests.scala
index eb4bcd1..3c2aac8 100644
--- a/tests/src/test/scala/system/packages/MessageHubProduceTests.scala
+++ b/tests/src/test/scala/system/packages/MessageHubProduceTests.scala
@@ -200,7 +200,7 @@ class MessageHubProduceTests
             // verify trigger fired
             println("Polling for activations")
             val activations = wsk.activation.pollFor(N = 1, Some(triggerName), retries = maxRetries)
-            assert(activations.length == 1)
+            assert(activations.length > 0)
 
             val matchingActivations = for {
                 id <- activations
@@ -269,7 +269,7 @@ class MessageHubProduceTests
             // verify trigger fired
             println("Polling for activations")
             val activations = wsk.activation.pollFor(N = 1, Some(triggerName), retries = maxRetries)
-            assert(activations.length == 1)
+            assert(activations.length > 0)
 
             val matchingActivations = for {
                 id <- activations


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services