mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 08:17:26 +00:00
Merge pull request #5452 from piosz/fixes
Increased default timeout in APIServer to 2 minutes
This commit is contained in:
commit
26acbc417b
@ -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) {
|
||||||
|
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user