From a2bb2144b3e0d49ac615976bfac462a307d85f0e Mon Sep 17 00:00:00 2001 From: Flavio Crisciani Date: Fri, 13 Jul 2018 11:21:44 -0700 Subject: [PATCH] Fix flakyness in TestDockerNetworkInternalMode Instead of waiting for the DNS to fail, try to access a specific external IP and verify that 100% of the pakcets are being lost. Signed-off-by: Flavio Crisciani --- integration-cli/docker_cli_network_unix_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-cli/docker_cli_network_unix_test.go b/integration-cli/docker_cli_network_unix_test.go index d4167f6620..60f211cda8 100644 --- a/integration-cli/docker_cli_network_unix_test.go +++ b/integration-cli/docker_cli_network_unix_test.go @@ -1644,9 +1644,9 @@ func (s *DockerSuite) TestDockerNetworkInternalMode(c *check.C) { c.Assert(waitRun("first"), check.IsNil) dockerCmd(c, "run", "-d", "--net=internal", "--name=second", "busybox:glibc", "top") c.Assert(waitRun("second"), check.IsNil) - out, _, err := dockerCmdWithError("exec", "first", "ping", "-W", "4", "-c", "1", "www.google.com") + out, _, err := dockerCmdWithError("exec", "first", "ping", "-W", "4", "-c", "1", "8.8.8.8") c.Assert(err, check.NotNil) - c.Assert(out, checker.Contains, "ping: bad address") + c.Assert(out, checker.Contains, "100% packet loss") _, _, err = dockerCmdWithError("exec", "second", "ping", "-c", "1", "first") c.Assert(err, check.IsNil) }