Skip to content

Commit ec295c0

Browse files
Antonio Ojeaaojea
authored andcommitted
e2e networking: wait for endpoints to be published
e2e test wait for the endpoints objects to be created
1 parent aadaa5d commit ec295c0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/e2e/framework/network/utils.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,13 @@ func (config *NetworkingTestConfig) setup(selector map[string]string) {
673673
} else {
674674
config.NodeIP = e2enode.FirstAddress(nodeList, v1.NodeInternalIP)
675675
}
676+
677+
ginkgo.By("Waiting for NodePort service to expose endpoint")
678+
err = framework.WaitForServiceEndpointsNum(config.f.ClientSet, config.Namespace, nodePortServiceName, len(config.EndpointPods), time.Second, wait.ForeverTestTimeout)
679+
framework.ExpectNoError(err, "failed to validate endpoints for service %s in namespace: %s", nodePortServiceName, config.Namespace)
680+
ginkgo.By("Waiting for Session Affinity service to expose endpoint")
681+
err = framework.WaitForServiceEndpointsNum(config.f.ClientSet, config.Namespace, sessionAffinityServiceName, len(config.EndpointPods), time.Second, wait.ForeverTestTimeout)
682+
framework.ExpectNoError(err, "failed to validate endpoints for service %s in namespace: %s", sessionAffinityServiceName, config.Namespace)
676683
}
677684

678685
func (config *NetworkingTestConfig) createNetProxyPods(podName string, selector map[string]string) []*v1.Pod {

0 commit comments

Comments
 (0)