diff --git a/test/e2e/federation-util.go b/test/e2e/federation-util.go index d39e764b3a7..881fdd5d88e 100644 --- a/test/e2e/federation-util.go +++ b/test/e2e/federation-util.go @@ -300,6 +300,10 @@ func cleanupServiceShardsAndProviderResources(namespace string, service *v1.Serv // Get failed with an error, try again. framework.Logf("Failed to find service %q in namespace %q, in cluster %q: %v. Trying again in %s", service.Name, namespace, name, err, framework.Poll) return false, nil + } else if errors.IsNotFound(err) { + cSvc = nil + By(fmt.Sprintf("Service %q in namespace %q in cluster %q not found", service.Name, namespace, name)) + return true, nil } By(fmt.Sprintf("Service %q in namespace %q in cluster %q found", service.Name, namespace, name)) return true, nil @@ -307,7 +311,7 @@ func cleanupServiceShardsAndProviderResources(namespace string, service *v1.Serv if err != nil || cSvc == nil { By(fmt.Sprintf("Failed to find service %q in namespace %q, in cluster %q in %s", service.Name, namespace, name, FederatedServiceTimeout)) - return + continue } err = cleanupServiceShard(c.Clientset, name, namespace, cSvc, FederatedServiceTimeout)