Commit 1c54e411 authored by Daniel Smith's avatar Daniel Smith

Extend timeout to allow for observed slow proxy requests

parent f899a40c
...@@ -45,6 +45,9 @@ const ( ...@@ -45,6 +45,9 @@ const (
// Only print this many characters of the response (to keep the logs // Only print this many characters of the response (to keep the logs
// legible). // legible).
maxDisplayBodyLen = 100 maxDisplayBodyLen = 100
// We have seen one of these calls take just over 15 seconds, so putting this at 30.
proxyHTTPCallTimeout = 30 * time.Second
) )
func proxyContext(version string) { func proxyContext(version string) {
...@@ -228,8 +231,8 @@ func proxyContext(version string) { ...@@ -228,8 +231,8 @@ func proxyContext(version string) {
if e, a := val, string(body); e != a { if e, a := val, string(body); e != a {
recordError(fmt.Sprintf("%v: path %v: wanted %v, got %v", i, path, e, a)) recordError(fmt.Sprintf("%v: path %v: wanted %v, got %v", i, path, e, a))
} }
if d > 15*time.Second { if d > proxyHTTPCallTimeout {
recordError(fmt.Sprintf("%v: path %v took %v > 15s", i, path, d)) recordError(fmt.Sprintf("%v: path %v took %v > %v", i, path, d, proxyHTTPCallTimeout))
} }
}(i, path, val) }(i, path, val)
// default QPS is 5 // default QPS is 5
...@@ -295,7 +298,7 @@ func nodeProxyTest(f *Framework, prefix, nodeDest string) { ...@@ -295,7 +298,7 @@ func nodeProxyTest(f *Framework, prefix, nodeDest string) {
} else { } else {
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
Expect(status).To(Equal(http.StatusOK)) Expect(status).To(Equal(http.StatusOK))
Expect(d).To(BeNumerically("<", 15*time.Second)) Expect(d).To(BeNumerically("<", proxyHTTPCallTimeout))
} }
} }
if serviceUnavailableErrors > 0 { if serviceUnavailableErrors > 0 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment