mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-01 14:22:17 +00:00
Remove one slightly-broken wait-for-endpoints test util and fix another
This commit is contained in:
@@ -1569,6 +1569,10 @@ func WaitForReplicationControllerwithSelector(c clientset.Interface, namespace s
|
||||
func WaitForEndpoint(c clientset.Interface, ns, name string) error {
|
||||
for t := time.Now(); time.Since(t) < EndpointRegisterTimeout; time.Sleep(Poll) {
|
||||
endpoint, err := c.Core().Endpoints(ns).Get(name, metav1.GetOptions{})
|
||||
if apierrs.IsNotFound(err) {
|
||||
Logf("Endpoint %s/%s is not ready yet", ns, name)
|
||||
continue
|
||||
}
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
if len(endpoint.Subsets) == 0 || len(endpoint.Subsets[0].Addresses) == 0 {
|
||||
Logf("Endpoint %s/%s is not ready yet", ns, name)
|
||||
|
||||
Reference in New Issue
Block a user