Remove/Comment time.Sleep in integration tests

Remove what seems unnecessary time.Sleep (1 second even) and comment the
ones that seemed necessary.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 799d9605d6d37a0f5c559b0325d924ad183ff4ee
Component: engine
This commit is contained in:
Vincent Demeester
2015-08-11 09:41:11 +02:00
parent b3cd3aa03a
commit 22da8315f6
17 changed files with 42 additions and 93 deletions

View File

@ -17,8 +17,7 @@ func (s *DockerSuite) TestCliStatsNoStreamGetCpu(c *check.C) {
out, _ := dockerCmd(c, "run", "-d", "busybox", "/bin/sh", "-c", "while true;do echo 'Hello'; usleep 100000; done")
id := strings.TrimSpace(out)
err := waitRun(id)
c.Assert(err, check.IsNil)
c.Assert(waitRun(id), check.IsNil)
resp, body, err := sockRequestRaw("GET", fmt.Sprintf("/containers/%s/stats?stream=false", id), nil, "")
c.Assert(err, check.IsNil)
@ -79,8 +78,7 @@ func (s *DockerSuite) TestApiNetworkStats(c *check.C) {
// Run container for 30 secs
out, _ := dockerCmd(c, "run", "-d", "busybox", "top")
id := strings.TrimSpace(out)
err := waitRun(id)
c.Assert(err, check.IsNil)
c.Assert(waitRun(id), check.IsNil)
// Retrieve the container address
contIP := findContainerIP(c, id)