Skip to content

Commit

Permalink
add more retries to load balancer test
Browse files Browse the repository at this point in the history
  • Loading branch information
devigned committed Jan 13, 2021
1 parent e766c44 commit 8982c09
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/e2e/azure_lb.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func AzureLBSpec(ctx context.Context, inputGetter func() AzureLBSpecInput) {
By("connecting directly to the external LB service")
url := fmt.Sprintf("http://%s", elbIP)
client := retryablehttp.NewClient()
client.RetryMax = 10
client.RetryMax = 50
resp, err := client.Get(url)
if resp != nil {
defer func() {
Expand All @@ -206,13 +206,13 @@ func AzureLBSpec(ctx context.Context, inputGetter func() AzureLBSpecInput) {

func extractServiceIp(svc *corev1.Service) string {
var ilbIP string
for _, i := range svc.Status.LoadBalancer.Ingress {
if net.ParseIP(i.IP) != nil {
if k8snet.IsIPv6String(i.IP) {
ilbIP = fmt.Sprintf("[%s]", i.IP)
for _, ingress := range svc.Status.LoadBalancer.Ingress {
if net.ParseIP(ingress.IP) != nil {
if k8snet.IsIPv6String(ingress.IP) {
ilbIP = fmt.Sprintf("[%s]", ingress.IP)
break
}
ilbIP = i.IP
ilbIP = ingress.IP
break
}
}
Expand Down

0 comments on commit 8982c09

Please sign in to comment.