From fd03127cac4bfa6167cd9f372ad3d1c0a4372f7b Mon Sep 17 00:00:00 2001 From: Claudiu Belu Date: Sun, 3 Mar 2019 13:30:28 -0800 Subject: [PATCH] tests: Adds retry for dig for ExternalName test The network connection might not yet be established by the time the container starts, causing the dig command to fail. Retrying the dig command will solve this issue. This approach is similar to the other DNS Conformance tests. --- test/e2e/network/dns_common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/network/dns_common.go b/test/e2e/network/dns_common.go index c93c431a3cd..e68e8190f6a 100644 --- a/test/e2e/network/dns_common.go +++ b/test/e2e/network/dns_common.go @@ -494,7 +494,7 @@ func createProbeCommand(namesToResolve []string, hostEntries []string, ptrLookup // createTargetedProbeCommand returns a command line that performs a DNS lookup for a specific record type func createTargetedProbeCommand(nameToResolve string, lookup string, fileNamePrefix string) (string, string) { fileName := fmt.Sprintf("%s_udp@%s", fileNamePrefix, nameToResolve) - probeCmd := fmt.Sprintf("dig +short +tries=12 %s %s > /results/%s", nameToResolve, lookup, fileName) + probeCmd := fmt.Sprintf("for i in `seq 1 30`; do dig +short %s %s > /results/%s; sleep 1; done", nameToResolve, lookup, fileName) return probeCmd, fileName }