From 8d1455d88b66011713da67098dc3464b897af9cd Mon Sep 17 00:00:00 2001 From: Doug Davis Date: Tue, 31 Mar 2015 16:57:43 -0700 Subject: [PATCH] Increase timeout on TestRunOOMExitCode test I can never get it to work for me when its just 3 seconds. With this change it generates the OOM message around 17 seconds, but I increased the timeout to 30 for people with slower machines Signed-off-by: Doug Davis --- integration-cli/docker_cli_run_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-cli/docker_cli_run_test.go b/integration-cli/docker_cli_run_test.go index 0b6e2eddb3..043716caef 100644 --- a/integration-cli/docker_cli_run_test.go +++ b/integration-cli/docker_cli_run_test.go @@ -3281,7 +3281,7 @@ func TestRunOOMExitCode(t *testing.T) { go func() { 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) if expected := 137; exitCode != expected { 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 { case <-done: - case <-time.After(3 * time.Second): + case <-time.After(30 * time.Second): t.Fatal("Timeout waiting for container to die on OOM") }