This is an automated email from the ASF dual-hosted git repository.

rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new 6b1303d  Ensure that limits are set properly (#4048)
6b1303d is described below

commit 6b1303d1e72a4509f0a466603e5e5293d79988ed
Author: Chetan Mehrotra <[email protected]>
AuthorDate: Wed Oct 10 23:44:37 2018 +0530

    Ensure that limits are set properly (#4048)
---
 tests/src/test/scala/whisk/core/database/LimitsCommandTests.scala  | 6 +++++-
 tools/admin/src/main/scala/whisk/core/database/LimitsCommand.scala | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/src/test/scala/whisk/core/database/LimitsCommandTests.scala 
b/tests/src/test/scala/whisk/core/database/LimitsCommandTests.scala
index 69684db..f1de23f 100644
--- a/tests/src/test/scala/whisk/core/database/LimitsCommandTests.scala
+++ b/tests/src/test/scala/whisk/core/database/LimitsCommandTests.scala
@@ -55,7 +55,11 @@ class LimitsCommandTests extends FlatSpec with 
WhiskAdminCliTestBase {
       ns) shouldBe CommandMessages.limitsSuccessfullySet(ns)
 
     val limits = 
limitsStore.get[LimitEntity](DocInfo(LimitsCommand.limitIdOf(EntityName(ns)))).futureValue
-    limits.limits shouldBe UserLimits(Some(3), Some(7), Some(11), 
Some(Set("nodejs:6", "blackbox")))
+    limits.limits shouldBe UserLimits(
+      invocationsPerMinute = Some(3),
+      firesPerMinute = Some(7),
+      concurrentInvocations = Some(11),
+      allowedKinds = Some(Set("nodejs:6", "blackbox")))
 
     resultOk("limits", "set", "--invocationsPerMinute", "13", ns) shouldBe 
CommandMessages.limitsSuccessfullyUpdated(ns)
 
diff --git a/tools/admin/src/main/scala/whisk/core/database/LimitsCommand.scala 
b/tools/admin/src/main/scala/whisk/core/database/LimitsCommand.scala
index 4e0e6e0..168fc4c 100644
--- a/tools/admin/src/main/scala/whisk/core/database/LimitsCommand.scala
+++ b/tools/admin/src/main/scala/whisk/core/database/LimitsCommand.scala
@@ -77,8 +77,8 @@ class LimitsCommand extends Subcommand("limits") with 
WhiskCommand {
         EntityName(namespace()),
         UserLimits(
           invocationsPerMinute.toOption,
-          firesPerMinute.toOption,
           concurrentInvocations.toOption,
+          firesPerMinute.toOption,
           allowedKinds.toOption.map(_.toSet)))
   }
   addSubcommand(set)

Reply via email to