Increased default timeout in APIServer to 2 minutes

This should for #5431
This commit is contained in:
Piotr Szczesniak 2015-03-13 20:24:33 +01:00
parent 5326baed7b
commit ffcf7b1866
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)
}
return 30 * time.Second
// TODO: change back to 30s once #5180 is fixed
return 2 * time.Minute
}
func readBody(req *http.Request) ([]byte, error) {

View File

@ -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 {