Skip to content

Commit

Permalink
Retry channel spec update in conformance tests (#3971)
Browse files Browse the repository at this point in the history
  • Loading branch information
aliok authored Aug 31, 2020
1 parent 1b8b850 commit 2f233b5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/conformance/helpers/channel_spec_test_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2f233b5

Please sign in to comment.