Merge pull request #92588 from aojea/e2enet

e2e networking: wait for endpoints to be published
This commit is contained in:
Kubernetes Prow Robot 2020-06-30 00:03:45 -07:00 committed by GitHub
commit 2e2859a11a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -673,6 +673,13 @@ func (config *NetworkingTestConfig) setup(selector map[string]string) {
} else {
config.NodeIP = e2enode.FirstAddress(nodeList, v1.NodeInternalIP)
}
ginkgo.By("Waiting for NodePort service to expose endpoint")
err = framework.WaitForServiceEndpointsNum(config.f.ClientSet, config.Namespace, nodePortServiceName, len(config.EndpointPods), time.Second, wait.ForeverTestTimeout)
framework.ExpectNoError(err, "failed to validate endpoints for service %s in namespace: %s", nodePortServiceName, config.Namespace)
ginkgo.By("Waiting for Session Affinity service to expose endpoint")
err = framework.WaitForServiceEndpointsNum(config.f.ClientSet, config.Namespace, sessionAffinityServiceName, len(config.EndpointPods), time.Second, wait.ForeverTestTimeout)
framework.ExpectNoError(err, "failed to validate endpoints for service %s in namespace: %s", sessionAffinityServiceName, config.Namespace)
}
func (config *NetworkingTestConfig) createNetProxyPods(podName string, selector map[string]string) []*v1.Pod {