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/06/07 13:33:37 UTC

[GitHub] mdeuser commented on a change in pull request #3694: Add retries to CLI test framework for network errors

mdeuser commented on a change in pull request #3694: Add retries to CLI test framework for network errors
URL: https://github.com/apache/incubator-openwhisk/pull/3694#discussion_r193747609
 
 

 ##########
 File path: tests/src/test/scala/common/Wsk.scala
 ##########
 @@ -1036,13 +1036,26 @@ trait RunWskCmd extends BaseRunWsk {
     val args = baseCommand
     if (verbose) args += "--verbose"
     if (showCmd) println(args.mkString(" ") + " " + params.mkString(" "))
-    val rr = TestUtils.runCmd(
-      DONTCARE_EXIT,
-      workingDir,
-      TestUtils.logger,
-      sys.env ++ env,
-      stdinFile.getOrElse(null),
-      args ++ params: _*)
+    val rr =
+      retry(
+        {
+          val rr = TestUtils.runCmd(
+            DONTCARE_EXIT,
+            workingDir,
+            TestUtils.logger,
+            sys.env ++ env,
+            stdinFile.getOrElse(null),
+            args ++ params: _*)
+
+          if (expectedExitCode != NETWORK_ERROR_EXIT && rr.exitCode == NETWORK_ERROR_EXIT) {
+            println("A network error occurred.")
 
 Review comment:
   maybe add a bit more context to this output line... i.e. that the cli will be retried.. maybe the retry count if available..

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