Merge pull request #5452 from piosz/fixes

Increased default timeout in APIServer to 2 minutes
This commit is contained in:
Robert Bailey 2015-03-16 08:06:28 -07:00
commit 26acbc417b
2 changed files with 4 additions and 3 deletions

View File

@ -258,7 +258,8 @@ func parseTimeout(str string) time.Duration {
} }
glog.Errorf("Failed to parse %q: %v", str, err) 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) { func readBody(req *http.Request) ([]byte, error) {

View File

@ -1216,10 +1216,10 @@ func TestUpdateChecksDecode(t *testing.T) {
} }
func TestParseTimeout(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) 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) t.Errorf("bad timeout produces %v", d)
} }
if d := parseTimeout("10s"); d != 10*time.Second { if d := parseTimeout("10s"); d != 10*time.Second {