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/02/19 09:27:37 UTC

[GitHub] markusthoemmes commented on a change in pull request #3302: Sanitize test subjects before tests.

markusthoemmes commented on a change in pull request #3302: Sanitize test subjects before tests.
URL: https://github.com/apache/incubator-openwhisk/pull/3302#discussion_r169020793
 
 

 ##########
 File path: tests/src/test/scala/limits/ThrottleTests.scala
 ##########
 @@ -298,10 +298,25 @@ class NamespaceSpecificThrottleTests
     with BeforeAndAfterAll
     with LocalHelper {
 
+  val defaultAction = Some(TestUtils.getTestActionFilename("hello.js"))
+
   val wskadmin = new RunWskAdminCmd {}
   val wsk = new WskRest
 
-  val defaultAction = Some(TestUtils.getTestActionFilename("hello.js"))
+  def sanitizeNamespaces(namespaces: Seq[String], expectedExitCode: Int = SUCCESS_EXIT) = {
+    namespaces.foreach { ns =>
+      try {
+        disposeAdditionalTestSubject(ns, expectedExitCode)
+        withClue(s"failed to delete temporary limits for $ns") {
+          wskadmin.cli(Seq("limits", "delete", ns), expectedExitCode)
 
 Review comment:
   `expectedExitCode` will make no difference if you try/catch and ignore everything, or did I miss something?

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