Skip to content

Commit

Permalink
Merge pull request kubernetes#5736 from satnam6502/network
Browse files Browse the repository at this point in the history
Add extra diagnostics to networking e2e test
  • Loading branch information
zmerlynn committed Mar 20, 2015
2 parents f57540c + 2d345cb commit cef66d3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/e2e/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,16 @@ var _ = Describe("Networking", func() {
var body []byte
for i := 0; i < maxAttempts && !passed; i++ {
time.Sleep(2 * time.Second)
Logf("About to make a proxy status call")
start := time.Now()
body, err = c.Get().
Namespace(ns).
Prefix("proxy").
Resource("services").
Name(svc.Name).
Suffix("status").
Do().Raw()
DoRaw()
Logf("Proxy status call returned in %v", time.Since(start))
if err != nil {
Logf("Attempt %v/%v: service/pod still starting. (error: '%v')", i, maxAttempts, err)
continue
Expand All @@ -174,7 +177,7 @@ var _ = Describe("Networking", func() {
Namespace(ns).Prefix("proxy").
Resource("services").
Name(svc.Name).Suffix("read").
Do().Raw(); err != nil {
DoRaw(); err != nil {
Failf("Failed on attempt %v. Cleaning up. Error reading details: %v", i, err)
} else {
Failf("Failed on attempt %v. Cleaning up. Details:\n%s", i, string(body))
Expand All @@ -190,7 +193,7 @@ var _ = Describe("Networking", func() {
Resource("services").
Name(svc.Name).
Suffix("read").
Do().Raw(); err != nil {
DoRaw(); err != nil {
Failf("Timed out. Cleaning up. Error reading details: %v", err)
} else {
Failf("Timed out. Cleaning up. Details:\n%s", string(body))
Expand All @@ -212,7 +215,7 @@ var _ = Describe("Networking", func() {
data, err := c.RESTClient.Get().
Namespace(ns).
AbsPath(test.path).
Do().Raw()
DoRaw()
if err != nil {
Failf("Failed: %v\nBody: %s", err, string(data))
}
Expand Down

0 comments on commit cef66d3

Please sign in to comment.