tardieu commented on a change in pull request #3177: Avoid repeated throttle
check for sequences
URL:
https://github.com/apache/incubator-openwhisk/pull/3177#discussion_r161085907
##########
File path: tests/src/test/scala/limits/ThrottleTests.scala
##########
@@ -400,6 +404,44 @@ class NamespaceSpecificThrottleTests
}, 2, Some(1.second))
}
+ // One sequence invocation should count as one invocation for rate
throttling purposes.
+ // This is independent of the number of actions in the sequences.
+ it should "respect overridden rate-throttles of 1 for sequences" in
withAssetCleaner(oneSequenceProps) {
+ (wp, assetHelper) =>
+ implicit val props = wp
+
+ val actionName = "oneAction"
+ val sequenceName = "oneSequence"
+
+ assetHelper.withCleaner(wsk.action, actionName) { (action, _) =>
+ action.create(actionName, defaultAction)
+ }
+
+ assetHelper.withCleaner(wsk.action, sequenceName) { (action, _) =>
+ action.create(sequenceName, Some(s"$actionName,$actionName"), kind =
Some("sequence"))
+ }
+
+ val deployedControllers =
WhiskProperties.getControllerHosts.split(",").length
+
+ // One invoke should be allowed.
+ wsk.action
+ .invoke(sequenceName, expectedExitCode = TestUtils.DONTCARE_EXIT)
+ .exitCode shouldBe TestUtils.SUCCESS_EXIT
Review comment:
It did not work for me. `expectedExitCode` is `ACCEPTED` and not `SUCCESS`.
I decided to follow the pattern of the other tests, rather than improvising.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services