|
@@ -3281,7 +3281,7 @@ func TestRunOOMExitCode(t *testing.T) {
|
|
go func() {
|
|
go func() {
|
|
defer close(done)
|
|
defer close(done)
|
|
|
|
|
|
- runCmd := exec.Command(dockerBinary, "run", "-m", "4MB", "busybox", "sh", "-c", "x=a; while true; do x=$x$x; done")
|
|
|
|
|
|
+ runCmd := exec.Command(dockerBinary, "run", "-m", "4MB", "busybox", "sh", "-c", "x=a; while true; do x=$x$x$x$x; done")
|
|
out, exitCode, _ := runCommandWithOutput(runCmd)
|
|
out, exitCode, _ := runCommandWithOutput(runCmd)
|
|
if expected := 137; exitCode != expected {
|
|
if expected := 137; exitCode != expected {
|
|
t.Fatalf("wrong exit code for OOM container: expected %d, got %d (output: %q)", expected, exitCode, out)
|
|
t.Fatalf("wrong exit code for OOM container: expected %d, got %d (output: %q)", expected, exitCode, out)
|
|
@@ -3290,7 +3290,7 @@ func TestRunOOMExitCode(t *testing.T) {
|
|
|
|
|
|
select {
|
|
select {
|
|
case <-done:
|
|
case <-done:
|
|
- case <-time.After(3 * time.Second):
|
|
|
|
|
|
+ case <-time.After(30 * time.Second):
|
|
t.Fatal("Timeout waiting for container to die on OOM")
|
|
t.Fatal("Timeout waiting for container to die on OOM")
|
|
}
|
|
}
|
|
|
|
|