openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From csantan...@apache.org
Subject [incubator-openwhisk-cli] 05/11: add wskadmin limits get/delete and cleanup tests subjects for limits. (#2553)
Date Thu, 10 Aug 2017 12:08:30 GMT
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-cli.git

commit 90400158965504fdfb14281d68271463029aba49
Author: rodric rabbah <rodric@gmail.com>
AuthorDate: Wed Aug 2 21:44:50 2017 -0400

    add wskadmin limits get/delete and cleanup tests subjects for limits. (#2553)
---
 .../src/test/scala/whisk/core/admin/WskAdminTests.scala | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/tests/src/test/scala/whisk/core/admin/WskAdminTests.scala b/tests/src/test/scala/whisk/core/admin/WskAdminTests.scala
index 0d31758..66ebd90 100644
--- a/tests/src/test/scala/whisk/core/admin/WskAdminTests.scala
+++ b/tests/src/test/scala/whisk/core/admin/WskAdminTests.scala
@@ -153,4 +153,21 @@ class WskAdminTests
             wskadmin.cli(Seq("user", "delete", subject)).stdout should include("Subject deleted")
         }
     }
+
+    it should "adjust throttles for namespace" in {
+        val wskadmin = new RunWskAdminCmd {}
+        val subject = Subject().asString
+        try {
+            // set some limits
+            wskadmin.cli(Seq("limits", "set", subject, "--invocationsPerMinute", "1", "--firesPerMinute",
"2", "--concurrentInvocations", "3"))
+            // check correctly set
+            val lines = wskadmin.cli(Seq("limits", "get", subject)).stdout.lines.toSeq
+            lines should have size 3
+            lines(0) shouldBe "invocationsPerMinute = 1"
+            lines(1) shouldBe "firesPerMinute = 2"
+            lines(2) shouldBe "concurrentInvocations = 3"
+        } finally {
+            wskadmin.cli(Seq("limits", "delete", subject)).stdout should include("Limits
deleted")
+        }
+    }
 }

-- 
To stop receiving notification emails like this one, please contact
"commits@openwhisk.apache.org" <commits@openwhisk.apache.org>.

Mime
View raw message