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-package-kafka.git


The following commit(s) were added to refs/heads/master by this push:
     new 192065f  More Resiliency Updates for MessageHub Tests (#254)
192065f is described below

commit 192065f134c0c80045e102ad43177793460a693d
Author: James Dubee <jwdu...@us.ibm.com>
AuthorDate: Fri Mar 2 17:54:53 2018 -0500

    More Resiliency Updates for MessageHub Tests (#254)
---
 tests/src/test/scala/system/packages/MessageHubFeedTests.scala | 10 +++++-----
 .../test/scala/system/packages/MessageHubProduceTests.scala    |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/src/test/scala/system/packages/MessageHubFeedTests.scala 
b/tests/src/test/scala/system/packages/MessageHubFeedTests.scala
index e280e39..9cd1e2f 100644
--- a/tests/src/test/scala/system/packages/MessageHubFeedTests.scala
+++ b/tests/src/test/scala/system/packages/MessageHubFeedTests.scala
@@ -175,7 +175,7 @@ class MessageHubFeedTests
       retry({
         println("Polling for activations")
         val activations = wsk.activation.pollFor(N = 1, Some(triggerName), 
retries = maxRetries)
-        assert(activations.length == 1)
+        assert(activations.nonEmpty)
 
         val matchingActivations = for {
           id <- activations
@@ -183,7 +183,7 @@ class MessageHubFeedTests
           if (activation.isRight && 
activation.right.get.fields.get("response").toString.contains(encodedCurrentTime))
         } yield activation.right.get
 
-        assert(matchingActivations.length > 0)
+        assert(matchingActivations.nonEmpty)
 
         val activation = matchingActivations.head
         activation.getFieldPath("response", "success") shouldBe 
Some(true.toJson)
@@ -311,7 +311,7 @@ class MessageHubFeedTests
           if (activation.isRight && 
(activation.right.get.fields.get("response").toString.contains(s"first${currentTime}")))
         } yield activation.right.get
 
-        assert(matchingActivations.length == 0)
+        assert(matchingActivations.isEmpty)
       }, N = 3)
   }
 
@@ -481,7 +481,7 @@ class MessageHubFeedTests
     retry({
       println("Polling for activations")
       val activations = wsk.activation.pollFor(N = 1, Some(triggerName), since 
= Some(since), retries = maxRetries)
-      assert(activations.length == 1)
+      assert(activations.nonEmpty)
 
       println("Validating content of activation(s)")
       val matchingActivations = for {
@@ -490,7 +490,7 @@ class MessageHubFeedTests
         if (activation.isRight && 
activation.right.get.fields.get("response").toString.contains(value))
       } yield activation.right.get
 
-      assert(matchingActivations.length > 0)
+      assert(matchingActivations.nonEmpty)
 
       val activation = matchingActivations.head
       activation.getFieldPath("response", "success") shouldBe Some(true.toJson)
diff --git a/tests/src/test/scala/system/packages/MessageHubProduceTests.scala 
b/tests/src/test/scala/system/packages/MessageHubProduceTests.scala
index 4d2b38c..37a5bd9 100644
--- a/tests/src/test/scala/system/packages/MessageHubProduceTests.scala
+++ b/tests/src/test/scala/system/packages/MessageHubProduceTests.scala
@@ -209,7 +209,7 @@ class MessageHubProduceTests
                     if (activation.isRight && 
activation.right.get.fields.get("response").toString.contains(decodedMessage))
                 } yield activation.right.get
 
-                assert(matchingActivations.length > 0)
+                assert(matchingActivations.nonEmpty)
 
                 val activation = matchingActivations.head
                 activation.getFieldPath("response", "success") shouldBe 
Some(true.toJson)
@@ -278,7 +278,7 @@ class MessageHubProduceTests
                     if (activation.isRight && 
activation.right.get.fields.get("response").toString.contains(decodedKey))
                 } yield activation.right.get
 
-                assert(matchingActivations.length > 0)
+                assert(matchingActivations.nonEmpty)
 
                 val activation = matchingActivations.head
                 activation.getFieldPath("response", "success") shouldBe 
Some(true.toJson)

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

Reply via email to