This is an automated email from the ASF dual-hosted git repository. markusthoemmes 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 832e0c7 Add test to verify, that action with high memory usage can be invoked. (#4025) 832e0c7 is described below commit 832e0c7455acf58c6a5d443e98dadbdba126decf Author: Christian Bickel <git...@cbickel.de> AuthorDate: Tue Sep 18 15:23:09 2018 +0200 Add test to verify, that action with high memory usage can be invoked. (#4025) --- .../test/scala/whisk/core/limits/ActionLimitsTests.scala | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/src/test/scala/whisk/core/limits/ActionLimitsTests.scala b/tests/src/test/scala/whisk/core/limits/ActionLimitsTests.scala index f2a759b..78fe0ba 100644 --- a/tests/src/test/scala/whisk/core/limits/ActionLimitsTests.scala +++ b/tests/src/test/scala/whisk/core/limits/ActionLimitsTests.scala @@ -399,6 +399,22 @@ class ActionLimitsTests extends TestHelpers with WskTestHelpers with WskActorSys } } + it should "be able to run a memory intensive actions" in withAssetCleaner(wskprops) { (wp, assetHelper) => + val name = "TestNodeJsInvokeHighMemory" + val allowedMemory = MemoryLimit.maxMemory + assetHelper.withCleaner(wsk.action, name, confirmDelete = true) { + val actionName = TestUtils.getTestActionFilename("memoryWithGC.js") + (action, _) => + action.create(name, Some(actionName), memory = Some(allowedMemory)) + } + // Don't try to allocate all the memory on invoking the action, as the maximum memory is set for the whole container + // and not only for the user action. + val run = wsk.action.invoke(name, Map("payload" -> (allowedMemory.toMB - 56).toJson)) + withActivation(wsk.activation, run) { response => + response.response.status shouldBe "success" + } + } + it should "be aborted when exceeding its memory limits" in withAssetCleaner(wskprops) { (wp, assetHelper) => val name = "TestNodeJsMemoryExceeding" assetHelper.withCleaner(wsk.action, name, confirmDelete = true) {