diff --git a/tests/src/test/scala/common/RunCliCmd.scala b/tests/src/test/scala/common/RunCliCmd.scala index 883ec83d4f4..9a31e376515 100644 --- a/tests/src/test/scala/common/RunCliCmd.scala +++ b/tests/src/test/scala/common/RunCliCmd.scala @@ -66,8 +66,8 @@ trait RunCliCmd extends Matchers { stdinFile: Option[File] = None, showCmd: Boolean = false, hideFromOutput: Seq[String] = Seq.empty, - retriesOnNetworkError: Int = 3): RunResult = { - require(retriesOnNetworkError >= 0, "retry count on network error must not be negative") + retriesOnError: Int = 3): RunResult = { + require(retriesOnError >= 0, "retry count on network error must not be negative") val args = baseCommand if (verbose) args += "--verbose" @@ -79,7 +79,7 @@ trait RunCliCmd extends Matchers { if (showCmd) println(args.mkString(" ")) val rr = - retry(0, retriesOnNetworkError, () => runCmd(DONTCARE_EXIT, workingDir, sys.env ++ env, stdinFile, args.toSeq)) + retry(0, retriesOnError, () => runCmd(DONTCARE_EXIT, workingDir, sys.env ++ env, stdinFile, args.toSeq)) withClue(hideStr(reportFailure(args, expectedExitCode, rr).toString(), hideFromOutput)) { if (expectedExitCode != TestUtils.DONTCARE_EXIT) { diff --git a/tests/src/test/scala/org/apache/openwhisk/common/RunCliCmdTests.scala b/tests/src/test/scala/org/apache/openwhisk/common/RunCliCmdTests.scala index 608bd053168..c4f2bc4233c 100644 --- a/tests/src/test/scala/org/apache/openwhisk/common/RunCliCmdTests.scala +++ b/tests/src/test/scala/org/apache/openwhisk/common/RunCliCmdTests.scala @@ -68,7 +68,7 @@ class RunCliCmdTests extends FlatSpec with RunCliCmd with BeforeAndAfterEach { it should "not retry commands if retry is disabled" in { rr = Some(TestRunResult(NETWORK_ERROR_EXIT)) noException shouldBe thrownBy { - cli(Seq.empty, expectedExitCode = ANY_ERROR_EXIT, retriesOnNetworkError = 0) + cli(Seq.empty, expectedExitCode = ANY_ERROR_EXIT, retriesOnError = 0) } cmdCount shouldBe 1 @@ -80,7 +80,7 @@ class RunCliCmdTests extends FlatSpec with RunCliCmd with BeforeAndAfterEach { rr = Some(TestRunResult(code)) noException shouldBe thrownBy { - cli(Seq.empty, expectedExitCode = DONTCARE_EXIT, retriesOnNetworkError = 3) + cli(Seq.empty, expectedExitCode = DONTCARE_EXIT, retriesOnError = 3) } cmdCount shouldBe 4