mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
choose a more unique request timeout default
This commit is contained in:
parent
064458de46
commit
e1dd9af894
@ -409,7 +409,8 @@ func parseTimeout(str string) time.Duration {
|
||||
}
|
||||
klog.Errorf("Failed to parse %q: %v", str, err)
|
||||
}
|
||||
return 30 * time.Second
|
||||
// 34 chose as a number close to 30 that is likely to be unique enough to jump out at me the next time I see a timeout. Everyone chooses 30.
|
||||
return 34 * time.Second
|
||||
}
|
||||
|
||||
func isDryRun(url *url.URL) bool {
|
||||
|
@ -826,10 +826,10 @@ func TestHasUID(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestParseTimeout(t *testing.T) {
|
||||
if d := parseTimeout(""); d != 30*time.Second {
|
||||
if d := parseTimeout(""); d != 34*time.Second {
|
||||
t.Errorf("blank timeout produces %v", d)
|
||||
}
|
||||
if d := parseTimeout("not a timeout"); d != 30*time.Second {
|
||||
if d := parseTimeout("not a timeout"); d != 34*time.Second {
|
||||
t.Errorf("bad timeout produces %v", d)
|
||||
}
|
||||
if d := parseTimeout("10s"); d != 10*time.Second {
|
||||
|
Loading…
Reference in New Issue
Block a user