Skip to content

Commit

Permalink
Change the variable name.
Browse files Browse the repository at this point in the history
  • Loading branch information
style95 committed Jul 13, 2022
1 parent 5dfdfca commit ca0b07d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tests/src/test/scala/common/RunCliCmd.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ca0b07d

Please sign in to comment.