diff --git a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go index a941f6fbaf4..3f1b42327f7 100644 --- a/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go +++ b/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go @@ -202,7 +202,7 @@ func finishRequest(timeout time.Duration, fn resultFunc) (result runtime.Object, case p := <-panicCh: panic(p) case <-time.After(timeout): - return nil, errors.NewTimeoutError("request did not complete within allowed duration", 0) + return nil, errors.NewTimeoutError(fmt.Sprintf("request did not complete within requested timeout %s", timeout), 0) } } diff --git a/test/e2e/apimachinery/webhook.go b/test/e2e/apimachinery/webhook.go index f5647aa989e..d44097f5285 100644 --- a/test/e2e/apimachinery/webhook.go +++ b/test/e2e/apimachinery/webhook.go @@ -576,7 +576,7 @@ func testWebhook(f *framework.Framework) { pod = hangingPod(f) _, err = client.CoreV1().Pods(f.Namespace.Name).Create(pod) Expect(err).NotTo(BeNil()) - expectedTimeoutErr := "request did not complete within allowed duration" + expectedTimeoutErr := "Timeout: request did not complete within requested timeout 30s" if !strings.Contains(err.Error(), expectedTimeoutErr) { framework.Failf("expect timeout error %q, got %q", expectedTimeoutErr, err.Error()) }