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_r194072596
##########
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:
Just a final retry that fails will have the stack trace.
----------------------------------------------------------------
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