From f06620ece3557eb263b221e476cef2955235ba75 Mon Sep 17 00:00:00 2001 From: Doug Davis Date: Fri, 17 Jul 2015 17:30:24 -0700 Subject: [PATCH] Move inspect into the loop on InspectExecID test Signed-off-by: Doug Davis --- integration-cli/docker_cli_exec_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/integration-cli/docker_cli_exec_test.go b/integration-cli/docker_cli_exec_test.go index 550e15446a..6a365aa937 100644 --- a/integration-cli/docker_cli_exec_test.go +++ b/integration-cli/docker_cli_exec_test.go @@ -436,15 +436,15 @@ func (s *DockerSuite) TestInspectExecID(c *check.C) { c.Fatalf("failed to start the exec cmd: %q", err) } - // Since its still running we should see the exec as part of the container - out, err = inspectField(id, "ExecIDs") - if err != nil { - c.Fatalf("failed to inspect container: %s, %v", out, err) - } - // Give the exec 10 chances/seconds to start then give up and stop the test tries := 10 for i := 0; i < tries; i++ { + // Since its still running we should see exec as part of the container + out, err = inspectField(id, "ExecIDs") + if err != nil { + c.Fatalf("failed to inspect container: %s, %v", out, err) + } + out = strings.TrimSuffix(out, "\n") if out != "[]" && out != "" { break