Explorar o código

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>
Christopher Jones %!s(int64=9) %!d(string=hai) anos
pai
achega
045aee2002
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      integration-cli/docker_cli_network_unix_test.go

+ 4 - 0
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