Explorar o código

Probably fix flaky test TestExecTTY

sleep 2 seconds before exec exit to make sure
the output of `cat /foo` will be read

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Lei Jitang %!s(int64=9) %!d(string=hai) anos
pai
achega
0e16eacad4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      integration-cli/docker_cli_exec_unix_test.go

+ 1 - 1
integration-cli/docker_cli_exec_unix_test.go

@@ -49,7 +49,7 @@ func (s *DockerSuite) TestExecTTY(c *check.C) {
 	c.Assert(err, checker.IsNil)
 	defer p.Close()
 
-	_, err = p.Write([]byte("cat /foo && exit\n"))
+	_, err = p.Write([]byte("cat /foo && sleep 2 && exit\n"))
 	c.Assert(err, checker.IsNil)
 
 	chErr := make(chan error)