mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Increase timeout to wait for port to become available
TestHttpd fails sporadically waiting for the port on slow machines. PiperOrigin-RevId: 246525277 Change-Id: Ie0ea71e3c4664d24f580eabd8f7461e47079f734
This commit is contained in:
committed by
Shentubot
parent
6b9ab65163
commit
95614bbefa
@@ -103,7 +103,7 @@ func TestHttpd(t *testing.T) {
|
||||
}
|
||||
|
||||
// Wait until it's up and running.
|
||||
if err := testutil.WaitForHTTP(port, 5*time.Second); err != nil {
|
||||
if err := testutil.WaitForHTTP(port, 10*time.Second); err != nil {
|
||||
t.Fatalf("WaitForHTTP() timeout: %v", err)
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ func TestNginx(t *testing.T) {
|
||||
}
|
||||
|
||||
// Wait until it's up and running.
|
||||
if err := testutil.WaitForHTTP(port, 5*time.Second); err != nil {
|
||||
if err := testutil.WaitForHTTP(port, 10*time.Second); err != nil {
|
||||
t.Fatalf("WaitForHTTP() timeout: %v", err)
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ func TestLifeCycle(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal("docker.FindPort(80) failed: ", err)
|
||||
}
|
||||
if err := testutil.WaitForHTTP(port, 5*time.Second); err != nil {
|
||||
if err := testutil.WaitForHTTP(port, 10*time.Second); err != nil {
|
||||
t.Fatal("WaitForHTTP() timeout:", err)
|
||||
}
|
||||
client := http.Client{Timeout: time.Duration(2 * time.Second)}
|
||||
|
||||
Reference in New Issue
Block a user