sven-lange-last commented on a change in pull request #4070: Diagnostic info + metrics for Docker command failures and timeouts URL: https://github.com/apache/incubator-openwhisk/pull/4070#discussion_r226552433
########## File path: tests/src/test/scala/whisk/core/containerpool/docker/test/DockerClientTests.scala ########## @@ -353,16 +349,39 @@ class DockerClientTests it should "fail with ProcessRunningException when run returns with exit code !=125 or no container ID" in { def runAndVerify(pre: ProcessRunningException, clue: String) = { val dc = dockerClient { Future.failed(pre) } - withClue(s"${clue} - exitCode = ${pre.exitCode}, stdout = '${pre.stdout}', stderr = '${pre.stderr}': ") { + withClue(s"${clue} - exitStatus = ${pre.exitStatus}, stdout = '${pre.stdout}', stderr = '${pre.stderr}': ") { the[ProcessRunningException] thrownBy await(dc.run("image", Seq.empty)) shouldBe pre } } Seq[(ProcessRunningException, String)]( - (ProcessRunningException(126, id.asString, "Unknown command"), "Exit code not 125"), - (ProcessRunningException(125, "", "Unknown flag: --foo"), "No container ID"), - (ProcessRunningException(1, "", ""), "Exit code not 125 and no container ID")).foreach { + (ProcessRunningException(ExitStatus(127), id.asString, "Unknown command"), "Exit code not 125"), Review comment: Well, that's just a change for preciseness that does not really change semantics. Already before the change, the "idea" of this test was to exercise `unknown command`. According to http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_08_02, `unknown command` means exit status 127 (new) instead of 126 (old). For the tested code, it's just of importance that the exit status is not 125. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services