Add timeouts to proxy calls in e2e tests

This commit is contained in:
Kris
2016-12-11 16:14:50 -08:00
parent 8070548ebe
commit 128af75b93
13 changed files with 159 additions and 8 deletions

View File

@@ -17,6 +17,7 @@ limitations under the License.
package e2e
import (
"context"
"fmt"
"io/ioutil"
"os"
@@ -566,7 +567,12 @@ func makeHttpRequestToService(c clientset.Interface, ns, service, path string, t
if errProxy != nil {
break
}
ctx, cancel := context.WithTimeout(context.Background(), framework.SingleCallTimeout)
defer cancel()
result, err = proxyRequest.Namespace(ns).
Context(ctx).
Name(service).
Suffix(path).
Do().