From 045aee2002e76cbfc9999472fe6e8fc54e0c0085 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Thu, 11 Feb 2016 16:30:35 -0500 Subject: [PATCH] Fix flaky test, TestDockerNetworkHostModeUngracefulDaemonRestart Fixes #19368 by waiting until all container statuses are running before killing the daemon Signed-off-by: Christopher Jones --- integration-cli/docker_cli_network_unix_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/integration-cli/docker_cli_network_unix_test.go b/integration-cli/docker_cli_network_unix_test.go index 59ed572612..5507603cfb 100644 --- a/integration-cli/docker_cli_network_unix_test.go +++ b/integration-cli/docker_cli_network_unix_test.go @@ -1012,6 +1012,10 @@ func (s *DockerNetworkSuite) TestDockerNetworkHostModeUngracefulDaemonRestart(c cName := fmt.Sprintf("hostc-%d", i) out, err := s.d.Cmd("run", "-d", "--name", cName, "--net=host", "--restart=always", "busybox", "top") 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