func (j *TestJig) WaitForLoadBalancerDestroy(ip string, port int, timeout time.Duration) (*v1.Service, error) {
	// TODO: once support ticket 21807001 is resolved, reduce this timeout back to something reasonable
	defer func() {
		if err := framework.EnsureLoadBalancerResourcesDeleted(ip, strconv.Itoa(port)); err != nil {
			framework.Logf("Failed to delete cloud resources for service: %s %d (%v)", ip, port, err)
		}
	}()

	framework.Logf("Waiting up to %v for service %q to have no LoadBalancer", timeout, j.Name)
	service, err := j.waitForCondition(timeout, "have no load balancer", func(svc *v1.Service) bool {
		return len(svc.Status.LoadBalancer.Ingress) == 0
	})
	if err != nil {
		return nil, err
	}
	return j.sanityCheckService(service, service.Spec.Type)
}
// WaitForLoadBalancerDestroy waits the given service to destroy a LoadBalancer, or returns an error after the given timeout
WaitForLoadBalancerDestroy waits the given service to destroy a LoadBalancer, or returns an error after the given timeout
// WaitForLoadBalancerDestroy waits the given service to destroy a LoadBalancer or returns an error after the given timeout
func (j *TestJig) WaitForLoadBalancerDestroy(ip string, port int, timeout time.Duration) (*v1.Service, error) {
	defer func() {
		if err := framework.EnsureLoadBalancerResourcesDeleted(ip, strconv.Itoa(port)); err != nil {
			framework.Logf("Failed to delete cloud resources for service: %s %d (%v)", ip, port, err)
		}
	}()
	framework.Logf("Waiting up to %v for service %q to have no LoadBalancer", timeout, j.Name)
	service, err := j.waitForCondition(timeout, "have no load balancer", func(svc *v1.Service) bool {
		return len(svc.Status.LoadBalancer.Ingress) == 0
	})
	if err != nil {
		return nil, err
	}
	return j.sanityCheckService(service, service.Spec.Type)
}
func ( j * TestJig ) WaitForLoadBalancerDestroy ( ip string , port int , timeout time . Duration ) ( * v1 . Service , error ) { defer func ( ) { if err := framework . EnsureLoadBalancerResourcesDeleted ( ip , strconv . Itoa ( port ) ) ; err != nil { framework . Logf ( " " , ip , port , err ) } } ( ) framework . Logf ( " " , timeout , j . Name ) service , err := j . waitForCondition ( timeout , " " , func ( svc * v1 . Service ) bool { return len ( svc . Status . LoadBalancer . Ingress ) == 0 } ) if err != nil { return nil , err } return j . sanityCheckService ( service , service . Spec . Type ) }
WaitForLoadBalancerDestroy waits the given service to destroy a LoadBalancer, or returns an error after the given timeout
WaitForLoadBalancerDestroy waits the given service to destroy a LoadBalancer or returns an error after the given timeout
// TODO: once support ticket 21807001 is resolved, reduce this timeout back to something reasonable