Browse code

Fix for the issue #17225 flaky test DockerSuite.TestExecEnv test case. This is done by calling waitRun() followed by the docker run, which ensures the container is loaded before calling docker exec to obtain the env variable set previously.

Incorporated the change as suggeted by duglin.

Signed-off-by: Anil Belur <askb23@gmail.com>

Anil Belur authored on 2015/10/24 22:22:23
Showing 1 changed files
... ...
@@ -127,6 +127,7 @@ func (s *DockerSuite) TestExecEnv(c *check.C) {
127 127
 	testRequires(c, DaemonIsLinux)
128 128
 	dockerCmd(c, "run", "-e", "LALA=value1", "-e", "LALA=value2",
129 129
 		"-d", "--name", "testing", "busybox", "top")
130
+	c.Assert(waitRun("testing"), check.IsNil)
130 131
 
131 132
 	out, _ := dockerCmd(c, "exec", "testing", "env")
132 133
 	if strings.Contains(out, "LALA=value1") ||