mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #37194 from AntaresS/fix-test-failure
fix a failed test
This commit is contained in:
commit
ca25df3b54
1 changed files with 2 additions and 1 deletions
|
@ -619,7 +619,8 @@ func (s *DockerSuite) TestRunOOMExitCode(c *check.C) {
|
|||
errChan := make(chan error)
|
||||
go func() {
|
||||
defer close(errChan)
|
||||
out, exitCode, _ := dockerCmdWithError("run", "-m", "4MB", "busybox", "sh", "-c", "x=a; while true; do x=$x$x$x$x; done")
|
||||
// memory limit lower than 8MB will raise an error of "device or resource busy" from docker-runc.
|
||||
out, exitCode, _ := dockerCmdWithError("run", "-m", "8MB", "busybox", "sh", "-c", "x=a; while true; do x=$x$x$x$x; done")
|
||||
if expected := 137; exitCode != expected {
|
||||
errChan <- fmt.Errorf("wrong exit code for OOM container: expected %d, got %d (output: %q)", expected, exitCode, out)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue