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

ETE: svc URL validation: more time and avoid nil panic #2289

Merged
merged 1 commit into from
Feb 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/e2e/kubernetes/kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,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
}