Fix flaky test TestStatsAllNewContainersAdded
Wait the new created container for running and then check if it is in the docker stats to avoid flaky test. Signed-off-by: Lei Jitang <leijitang@huawei.com> Upstream-commit: 71d6e71cff4122a987a4655723d50a296916f523 Component: engine
This commit is contained in:
@@ -118,6 +118,7 @@ func (s *DockerSuite) TestStatsAllNewContainersAdded(c *check.C) {
|
||||
}()
|
||||
|
||||
out, _ := dockerCmd(c, "run", "-d", "busybox", "top")
|
||||
c.Assert(waitRun(strings.TrimSpace(out)), check.IsNil)
|
||||
id <- strings.TrimSpace(out)[:12]
|
||||
|
||||
select {
|
||||
|
||||
Reference in New Issue
Block a user