From 32855f15ee51f3a594a145e3f28cc65120d5694d Mon Sep 17 00:00:00 2001 From: John Howard Date: Wed, 10 May 2017 13:26:04 -0700 Subject: [PATCH] Fix flaky TestAPIStatsNoStreamGetCpu Signed-off-by: John Howard Upstream-commit: c141574d5d9ea7bb5188764d5d193450dc2b9bc8 Component: engine --- components/engine/integration-cli/docker_api_stats_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/engine/integration-cli/docker_api_stats_test.go b/components/engine/integration-cli/docker_api_stats_test.go index f7e6df2377..f1cb5bb4ad 100644 --- a/components/engine/integration-cli/docker_api_stats_test.go +++ b/components/engine/integration-cli/docker_api_stats_test.go @@ -21,11 +21,10 @@ import ( var expectedNetworkInterfaceStats = strings.Split("rx_bytes rx_dropped rx_errors rx_packets tx_bytes tx_dropped tx_errors tx_packets", " ") func (s *DockerSuite) TestAPIStatsNoStreamGetCpu(c *check.C) { - out, _ := dockerCmd(c, "run", "-d", "busybox", "/bin/sh", "-c", "while true;do echo 'Hello'; usleep 100000; done") + out, _ := dockerCmd(c, "run", "-d", "busybox", "/bin/sh", "-c", "while true;usleep 100; do echo 'Hello'; done") id := strings.TrimSpace(out) c.Assert(waitRun(id), checker.IsNil) - resp, body, err := request.Get(fmt.Sprintf("/containers/%s/stats?stream=false", id)) c.Assert(err, checker.IsNil) c.Assert(resp.StatusCode, checker.Equals, http.StatusOK)