diff options
author | Andrei Vagin <avagin@google.com> | 2019-05-13 00:49:32 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-05-13 00:50:44 -0700 |
commit | 9f2b12c624a4a07c6662d1a5f1bced28b6eb86da (patch) | |
tree | 2502e216d1a5f9712f9d4b79c649d8f59d73d112 /runsc/test/integration | |
parent | c61a2e709a810233c310e409c07b0ed696f4e858 (diff) |
gvisor/runsc/tests: set timeout for http.Get()
WaitForHTTP tries GET requests on a port until the call succeeds or timeout.
But we want to be sure that one of our attempts will not stuck for
the whole timeout.
All timeouts are increased to 30 seconds, because test cases with smaller
timeouts fail sometimes even for the native container runtime (runc).
PiperOrigin-RevId: 247888467
Change-Id: I03cfd3275286bc686a78fd26da43231d20667851
Diffstat (limited to 'runsc/test/integration')
-rw-r--r-- | runsc/test/integration/integration_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runsc/test/integration/integration_test.go b/runsc/test/integration/integration_test.go index de17dd3c2..c51cab3ae 100644 --- a/runsc/test/integration/integration_test.go +++ b/runsc/test/integration/integration_test.go @@ -68,7 +68,7 @@ func TestLifeCycle(t *testing.T) { if err != nil { t.Fatal("docker.FindPort(80) failed: ", err) } - if err := testutil.WaitForHTTP(port, 10*time.Second); err != nil { + if err := testutil.WaitForHTTP(port, 30*time.Second); err != nil { t.Fatal("WaitForHTTP() timeout:", err) } client := http.Client{Timeout: time.Duration(2 * time.Second)} @@ -138,7 +138,7 @@ func TestPauseResume(t *testing.T) { } // Wait until it's up and running. - if err := testutil.WaitForHTTP(port, 20*time.Second); err != nil { + if err := testutil.WaitForHTTP(port, 30*time.Second); err != nil { t.Fatal("WaitForHTTP() timeout:", err) } |