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/06/21 02:26:26 UTC

[GitHub] csantanapr closed pull request #153: some minor test cleanup

csantanapr closed pull request #153: some minor test cleanup
URL: https://github.com/apache/incubator-openwhisk-package-alarms/pull/153
 
 
   

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/packages/AlarmsFeedTests.scala b/tests/src/test/scala/system/packages/AlarmsFeedTests.scala
index 131d52a..390f0e1 100644
--- a/tests/src/test/scala/system/packages/AlarmsFeedTests.scala
+++ b/tests/src/test/scala/system/packages/AlarmsFeedTests.scala
@@ -35,12 +35,11 @@ class AlarmsFeedTests
 
     val wskprops = WskProps()
     val wsk = new Wsk
-
     val defaultAction = Some(TestUtils.getTestActionFilename("hello.js"))
 
     behavior of "Alarms trigger service"
 
-    it should "should disable after reaching max triggers" in withAssetCleaner(wskprops) {
+    it should "disable after reaching max triggers" in withAssetCleaner(wskprops) {
         (wp, assetHelper) =>
             implicit val wskprops = wp // shadow global props and make implicit
             val triggerName = s"dummyAlarmsTrigger-${System.currentTimeMillis}"
@@ -69,7 +68,7 @@ class AlarmsFeedTests
                 trigger.create(name, feed = Some(s"$packageName/alarm"), parameters = Map(
                     "trigger_payload" -> "alarmTest".toJson,
                     "cron" -> "* * * * * *".toJson,
-                    "maxTriggers" -> 3.toJson))
+                    "maxTriggers" -> 1.toJson))
             }
 
             // create rule
@@ -78,9 +77,9 @@ class AlarmsFeedTests
             }
 
             // get activation list of the trigger
-            val activations = wsk.activation.pollFor(N = 4, Some(triggerName), retries = 30).length
+            val activations = wsk.activation.pollFor(N = 2, Some(triggerName), retries = 30).length
             println(s"Found activation size: $activations")
-            activations should be(3)
+            activations should be(1)
     }
 
     it should "update cron, startDate and stopDate parameters" in withAssetCleaner(wskprops) {


 

----------------------------------------------------------------
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