You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by cs...@apache.org on 2017/06/15 15:11:32 UTC
[incubator-openwhisk-package-kafka] branch master updated: Test
fixes (#180)
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 d3f2c10 Test fixes (#180)
d3f2c10 is described below
commit d3f2c10f9c7a87bcae0f602ebb96ae60341292cc
Author: Justin Berstler <bj...@us.ibm.com>
AuthorDate: Thu Jun 15 11:11:28 2017 -0400
Test fixes (#180)
* If "trigger.suffix" is not provided, ensure test trigger name is unique
* Account for the fact that the test Kafka instance is shared
Because the test kafka instance/topic are shared, it is possible that the number of trigger activations includes messages that were produced by entities other than the currently-running test. Account for this by polling for a larger-than-expected number of trigger activations and then sifting through those to ensure they match expectations.
---
tests/src/test/scala/system/health/BasicHealthTest.scala | 6 +++---
tests/src/test/scala/system/packages/MessageHubFeedTests.scala | 6 +++---
tests/src/test/scala/system/packages/MessageHubProduceTests.scala | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/tests/src/test/scala/system/health/BasicHealthTest.scala b/tests/src/test/scala/system/health/BasicHealthTest.scala
index 7476368..b0b7707 100644
--- a/tests/src/test/scala/system/health/BasicHealthTest.scala
+++ b/tests/src/test/scala/system/health/BasicHealthTest.scala
@@ -77,8 +77,8 @@ class BasicHealthTest
val baseTriggerName = "/_/BasicHealthTestTrigger"
val triggerName = System.getProperty("trigger.suffix") match {
- case suffix if suffix != "" => s"${baseTriggerName}-${suffix}"
- case _ => baseTriggerName
+ case suffix if suffix != "" && suffix != null => s"${baseTriggerName}-${suffix}"
+ case _ => s"${baseTriggerName}-${currentTime}"
}
(wp, assetHelper) =>
@@ -127,7 +127,7 @@ class BasicHealthTest
}
println("Polling for activations")
- val activations = wsk.activation.pollFor(N = 5, Some(triggerName), since = Some(start), retries = 30)
+ val activations = wsk.activation.pollFor(N = 100, Some(triggerName), since = Some(start), retries = 30)
assert(activations.length > 0)
println("Validating content of activation(s)")
diff --git a/tests/src/test/scala/system/packages/MessageHubFeedTests.scala b/tests/src/test/scala/system/packages/MessageHubFeedTests.scala
index 299087a..1375201 100644
--- a/tests/src/test/scala/system/packages/MessageHubFeedTests.scala
+++ b/tests/src/test/scala/system/packages/MessageHubFeedTests.scala
@@ -155,7 +155,7 @@ class MessageHubFeedTests
}
println("Polling for activations")
- val activations = wsk.activation.pollFor(N = 1, Some(triggerName), retries = 60)
+ val activations = wsk.activation.pollFor(N = 100, Some(triggerName), retries = 60)
assert(activations.length > 0)
val matchingActivations = for {
@@ -215,7 +215,7 @@ class MessageHubFeedTests
// verify there are two trigger activations required to handle these messages
println("Polling for activations")
- val activations = wsk.activation.pollFor(N = 2, Some(triggerName), retries = 60)
+ val activations = wsk.activation.pollFor(N = 100, Some(triggerName), retries = 60)
println("Verifying activation content")
val matchingActivations = for {
@@ -261,7 +261,7 @@ class MessageHubFeedTests
// verify there are no activations that match
println("Polling for activations")
- val activations = wsk.activation.pollFor(N = 1, Some(triggerName), retries = 60)
+ val activations = wsk.activation.pollFor(N = 100, Some(triggerName), retries = 60)
println("Verifying activation content")
val matchingActivations = for {
diff --git a/tests/src/test/scala/system/packages/MessageHubProduceTests.scala b/tests/src/test/scala/system/packages/MessageHubProduceTests.scala
index 2be8b31..31fd5ba 100644
--- a/tests/src/test/scala/system/packages/MessageHubProduceTests.scala
+++ b/tests/src/test/scala/system/packages/MessageHubProduceTests.scala
@@ -184,7 +184,7 @@ class MessageHubProduceTests
// verify trigger fired
println("Polling for activations")
- val activations = wsk.activation.pollFor(N = 1, Some(triggerName), retries = 60)
+ val activations = wsk.activation.pollFor(N = 100, Some(triggerName), retries = 60)
assert(activations.length > 0)
val matchingActivations = for {
@@ -244,7 +244,7 @@ class MessageHubProduceTests
// verify trigger fired
println("Polling for activations")
- val activations = wsk.activation.pollFor(N = 1, Some(triggerName), retries = 60)
+ val activations = wsk.activation.pollFor(N = 100, Some(triggerName), retries = 60)
assert(activations.length > 0)
val matchingActivations = for {
--
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].