jeremiaswerner closed pull request #3041: Reenable retry on delete of an entity 
after test, if there is a confl?
URL: https://github.com/apache/incubator-openwhisk/pull/3041
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tests/src/test/scala/common/WskTestHelpers.scala 
b/tests/src/test/scala/common/WskTestHelpers.scala
index b6aa35e31e..5784824366 100644
--- a/tests/src/test/scala/common/WskTestHelpers.scala
+++ b/tests/src/test/scala/common/WskTestHelpers.scala
@@ -31,6 +31,7 @@ import spray.json._
 
 import TestUtils.RunResult
 import TestUtils.CONFLICT
+import akka.http.scaladsl.model.StatusCodes
 
 /**
  * An arbitrary response of a whisk action. Includes the result as a JsObject 
as the
@@ -173,8 +174,9 @@ trait WskTestHelpers extends Matchers {
               case _: BasePackage if delete =>
                 val rr = cli.delete(n)(wskprops)
                 rr.exitCode match {
-                  case CONFLICT => whisk.utils.retry(cli.delete(n)(wskprops), 
5, Some(1.second))
-                  case _        => rr
+                  case CONFLICT | StatusCodes.Conflict.intValue =>
+                    whisk.utils.retry(cli.delete(n)(wskprops), 5, 
Some(1.second))
+                  case _ => rr
                 }
               case _ => if (delete) cli.delete(n)(wskprops) else 
cli.sanitize(n)(wskprops)
             }


 

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

Reply via email to