1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Fix flaky test, TestDockerNetworkHostModeUngracefulDaemonRestart

Fixes #19368 by waiting until all container statuses are running
before killing the daemon

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
This commit is contained in:
Christopher Jones 2016-02-11 16:30:35 -05:00
parent 2658341b5f
commit 045aee2002

View file

@ -1012,6 +1012,10 @@ func (s *DockerNetworkSuite) TestDockerNetworkHostModeUngracefulDaemonRestart(c
cName := fmt.Sprintf("hostc-%d", i) cName := fmt.Sprintf("hostc-%d", i)
out, err := s.d.Cmd("run", "-d", "--name", cName, "--net=host", "--restart=always", "busybox", "top") out, err := s.d.Cmd("run", "-d", "--name", cName, "--net=host", "--restart=always", "busybox", "top")
c.Assert(err, checker.IsNil, check.Commentf(out)) c.Assert(err, checker.IsNil, check.Commentf(out))
// verfiy container has finished starting before killing daemon
err = s.d.waitRun(fmt.Sprintf("hostc-%d", i))
c.Assert(err, checker.IsNil)
} }
// Kill daemon ungracefully and restart // Kill daemon ungracefully and restart