From 2a5f04dcc900888ff706e36e6360d0b51d82bed1 Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Sun, 25 Oct 2015 18:05:05 +0530 Subject: [PATCH] Fix for #17243 DockerSuite.TestExecAfterContainerRestart. Added waitRun(containerID) statement after docker run -d and docker restart to ensure the container is restarted before issuing a exec cmd. Signed-off-by: Anil Belur --- integration-cli/docker_cli_exec_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/integration-cli/docker_cli_exec_test.go b/integration-cli/docker_cli_exec_test.go index bb79384539..eab3a91907 100644 --- a/integration-cli/docker_cli_exec_test.go +++ b/integration-cli/docker_cli_exec_test.go @@ -82,7 +82,9 @@ func (s *DockerSuite) TestExecAfterContainerRestart(c *check.C) { testRequires(c, DaemonIsLinux) out, _ := dockerCmd(c, "run", "-d", "busybox", "top") cleanedContainerID := strings.TrimSpace(out) + c.Assert(waitRun(cleanedContainerID), check.IsNil) dockerCmd(c, "restart", cleanedContainerID) + c.Assert(waitRun(cleanedContainerID), check.IsNil) out, _ = dockerCmd(c, "exec", cleanedContainerID, "echo", "hello") outStr := strings.TrimSpace(out)