From 55543f10de37208f7a798bef948d0cc98d455f4c Mon Sep 17 00:00:00 2001 From: Ville Aikas Date: Wed, 29 Jul 2020 05:46:43 -0700 Subject: [PATCH] put the waiting of kresources in a retry loop for webhook failures --- test/lib/operation.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/lib/operation.go b/test/lib/operation.go index 7070c0f02ad..b74bc852388 100644 --- a/test/lib/operation.go +++ b/test/lib/operation.go @@ -88,7 +88,14 @@ func (c *Client) WaitForResourcesReadyOrFail(typemeta *metav1.TypeMeta) { // WaitForAllTestResourcesReady waits until all test resources in the namespace are Ready. func (c *Client) WaitForAllTestResourcesReady() error { // wait for all Knative resources created in this test to become ready. - if err := c.Tracker.WaitForKResourcesReady(); err != nil { + err := c.RetryWebhookErrors(func(attempts int) (err error) { + e := c.Tracker.WaitForKResourcesReady() + if e != nil { + c.T.Logf("Failed to get all KResources ready %v", e) + } + return e + }) + if err != nil { return err } // Explicitly wait for all pods that were created directly by this test to become ready.