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

@@ -18,6 +18,7 @@ package framework
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io"
@@ -335,7 +336,11 @@ func getSchedulingLatency(c clientset.Interface) (SchedulingLatency, error) {
}
}
if masterRegistered {
ctx, cancel := context.WithTimeout(context.Background(), SingleCallTimeout)
defer cancel()
rawData, err := c.Core().RESTClient().Get().
Context(ctx).
Prefix("proxy").
Namespace(api.NamespaceSystem).
Resource("pods").