mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
Merge pull request #34053 from bprashanth/trim_string
Automatic merge from submit-queue Check for empty string post trimming We curl in a retry loop and timeout, trimming stdout to find endpoint names. When curl hits the timeout, stdout is empty, so we insert the empty string into the received set of endpoints. Fixes https://github.com/kubernetes/kubernetes/issues/32684
This commit is contained in:
commit
0331b27f45
@ -170,7 +170,10 @@ func (config *NetworkingTestConfig) dialFromContainer(protocol, containerIP, tar
|
||||
continue
|
||||
}
|
||||
for _, hostName := range output["responses"] {
|
||||
eps.Insert(hostName)
|
||||
trimmed := strings.TrimSpace(hostName)
|
||||
if trimmed != "" {
|
||||
eps.Insert(trimmed)
|
||||
}
|
||||
}
|
||||
}
|
||||
framework.Logf("Waiting for endpoints: %v", expectedEps.Difference(eps))
|
||||
@ -217,7 +220,10 @@ func (config *NetworkingTestConfig) dialFromNode(protocol, targetIP string, targ
|
||||
// we confirm unreachability.
|
||||
framework.Logf("Failed to execute %v: %v", filterCmd, err)
|
||||
} else {
|
||||
eps.Insert(strings.TrimSpace(stdout))
|
||||
trimmed := strings.TrimSpace(stdout)
|
||||
if trimmed != "" {
|
||||
eps.Insert(trimmed)
|
||||
}
|
||||
}
|
||||
framework.Logf("Waiting for %+v endpoints, got endpoints %+v", expectedEps.Difference(eps), eps)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user