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.
This commit is contained in:
Claudiu Belu 2019-03-03 13:30:28 -08:00
parent 43616fc920
commit fd03127cac

View File

@ -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
}