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

 ##########
 File path: tests/src/test/scala/common/Wsk.scala
 ##########
 @@ -1036,13 +1036,28 @@ 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) {
+            withClue(hideStr(reportFailure(args ++ params, expectedExitCode, 
rr).toString(), hideFromOutput)) {
 
 Review comment:
   Yes, `withClue` will print the stack trace if the final retry fails.

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