Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
more time and avoid nil panic (#2289)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis authored Feb 16, 2018
1 parent 1d231c8 commit 3c3ef62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/e2e/kubernetes/kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu
Expect(err).NotTo(HaveOccurred())

By("Ensuring the service root URL returns the expected payload")
valid := s.Validate("(Welcome to nginx)", 5, 5*time.Second, cfg.Timeout)
valid := s.Validate("(Welcome to nginx)", 5, 30*time.Second, cfg.Timeout)
Expect(valid).To(BeTrue())

By("Ensuring we have outbound internet access from the nginx pods")
Expand Down
6 changes: 4 additions & 2 deletions test/e2e/kubernetes/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ func (s *Service) Validate(check string, attempts int, sleep, wait time.Duration
}
time.Sleep(sleep)
}
log.Printf("Unable to validate URL %s after %d attempts, err: %#v\n", url, i, err)
defer resp.Body.Close()
log.Printf("Unable to validate URL %s after %s, err: %#v\n", url, time.Duration(i)*wait, err)
if resp != nil {
defer resp.Body.Close()
}
return false
}

0 comments on commit 3c3ef62

Please sign in to comment.