From 8fdf1cca54157efae14f262080855474ad9f9423 Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Wed, 20 May 2015 17:36:37 -0700 Subject: [PATCH] use ginkgo native timeout method --- test/e2e/networking.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/test/e2e/networking.go b/test/e2e/networking.go index 3301ca46079..82101fad6e6 100644 --- a/test/e2e/networking.go +++ b/test/e2e/networking.go @@ -133,7 +133,8 @@ var _ = Describe("Networking", func() { }) //Now we can proceed with the test. - It("should function for intra-pod communication", func() { + It("should function for intra-pod communication", func(done Done) { + defer close(done) if testContext.Provider == "vagrant" { By("Skipping test which is broken for vagrant (See https://github.com/GoogleCloudPlatform/kubernetes/issues/3580)") @@ -200,17 +201,12 @@ var _ = Describe("Networking", func() { By("Waiting for connectivity to be verified") const maxAttempts = 60 - stopBy := time.Now().Add(2 * time.Minute) passed := false //once response OK, evaluate response body for pass/fail. var body []byte for i := 0; i < maxAttempts && !passed; i++ { - if time.Now().After(stopBy) { - Logf("Timeout exceeded") - break - } time.Sleep(2 * time.Second) Logf("About to make a proxy status call") start := time.Now() @@ -262,6 +258,6 @@ var _ = Describe("Networking", func() { } } Expect(string(body)).To(Equal("pass")) - }) + }, 120) })