From ffcf7b186666b601b3a201b57b6b267a00d315c6 Mon Sep 17 00:00:00 2001 From: Piotr Szczesniak Date: Fri, 13 Mar 2015 20:24:33 +0100 Subject: [PATCH] Increased default timeout in APIServer to 2 minutes This should for #5431 --- pkg/apiserver/apiserver.go | 3 ++- pkg/apiserver/apiserver_test.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/apiserver/apiserver.go b/pkg/apiserver/apiserver.go index ee3f78a5bcd..c8f749133f9 100644 --- a/pkg/apiserver/apiserver.go +++ b/pkg/apiserver/apiserver.go @@ -258,7 +258,8 @@ func parseTimeout(str string) time.Duration { } glog.Errorf("Failed to parse %q: %v", str, err) } - return 30 * time.Second + // TODO: change back to 30s once #5180 is fixed + return 2 * time.Minute } func readBody(req *http.Request) ([]byte, error) { diff --git a/pkg/apiserver/apiserver_test.go b/pkg/apiserver/apiserver_test.go index 1990946fc4a..af378a8d5c1 100644 --- a/pkg/apiserver/apiserver_test.go +++ b/pkg/apiserver/apiserver_test.go @@ -1216,10 +1216,10 @@ func TestUpdateChecksDecode(t *testing.T) { } func TestParseTimeout(t *testing.T) { - if d := parseTimeout(""); d != 30*time.Second { + if d := parseTimeout(""); d != 2*time.Minute { t.Errorf("blank timeout produces %v", d) } - if d := parseTimeout("not a timeout"); d != 30*time.Second { + if d := parseTimeout("not a timeout"); d != 2*time.Minute { t.Errorf("bad timeout produces %v", d) } if d := parseTimeout("10s"); d != 10*time.Second {