You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by je...@apache.org on 2017/12/01 15:23:12 UTC

[incubator-openwhisk] branch master updated: Reenable retry on delete of an entity after test, if there is a conflict. (#3041)

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

jeremiaswerner 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 1dd7789  Reenable retry on delete of an entity after test, if there is a conflict. (#3041)
1dd7789 is described below

commit 1dd7789d5a552f24b43feec7691892c6074ad670
Author: Christian Bickel <gi...@cbickel.de>
AuthorDate: Fri Dec 1 16:23:08 2017 +0100

    Reenable retry on delete of an entity after test, if there is a conflict. (#3041)
---
 tests/src/test/scala/common/WskTestHelpers.scala | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/src/test/scala/common/WskTestHelpers.scala b/tests/src/test/scala/common/WskTestHelpers.scala
index b6aa35e..5784824 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)
             }

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].