From 2f233b512190b738a678d5a1ef0db5043215c77a Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Mon, 31 Aug 2020 21:04:15 +0300 Subject: [PATCH] Retry channel spec update in conformance tests (#3971) --- test/conformance/helpers/channel_spec_test_helper.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/conformance/helpers/channel_spec_test_helper.go b/test/conformance/helpers/channel_spec_test_helper.go index fbe8123de94..9fe8a0f161a 100644 --- a/test/conformance/helpers/channel_spec_test_helper.go +++ b/test/conformance/helpers/channel_spec_test_helper.go @@ -119,7 +119,13 @@ func channelSpecAllowsSubscribersArray(st *testing.T, client *testlib.Client, ch st.Fatalf("Error unmarshaling %s: %s", u, err) } - _, err = client.Dynamic.Resource(gvr).Namespace(client.Namespace).Update(u, metav1.UpdateOptions{}) + err = client.RetryWebhookErrors(func(attempt int) error { + _, e := client.Dynamic.Resource(gvr).Namespace(client.Namespace).Update(u, metav1.UpdateOptions{}) + if e != nil { + client.T.Logf("Failed to update channel spec at attempt %d %q %q: %v", attempt, channel.Kind, channelName, e) + } + return e + }) return err }) if err != nil {