Skip to content

Commit

Permalink
docker: changed OOM killed error message
Browse files Browse the repository at this point in the history
  • Loading branch information
multani committed Oct 27, 2017
1 parent e5a7907 commit 15114e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/driver/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,7 @@ func (h *DockerHandle) run() {
if ierr != nil {
h.logger.Printf("[ERR] driver.docker: failed to inspect container %s: %v", h.containerID, ierr)
} else if container.State.OOMKilled {
werr = fmt.Errorf("Docker container killed by OOM killer")
werr = fmt.Errorf("OOM Killed")
}

close(h.doneCh)
Expand Down
2 changes: 1 addition & 1 deletion client/driver/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1793,7 +1793,7 @@ func TestDockerDriver_OOMKilled(t *testing.T) {
t.Fatalf("expected error, but container exited successfull")
}

if !strings.Contains(res.Err.Error(), "killed by OOM killer") {
if res.Err.Error() != "OOM Killed" {
t.Fatalf("not killed by OOM killer: %s", res.Err)
}

Expand Down

0 comments on commit 15114e4

Please sign in to comment.