Skip to content

Commit

Permalink
Retry service account update on conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
liggitt committed Jun 9, 2016
1 parent 93af6aa commit ce7aba5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/integration/service_account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,10 @@ func TestEnforcingServiceAccount(t *testing.T) {

time.Sleep(5)

_, err = clusterAdminKubeClient.ServiceAccounts(api.NamespaceDefault).Update(sa)
err = kclient.RetryOnConflict(kclient.DefaultBackoff, func() error {
_, err := clusterAdminKubeClient.ServiceAccounts(api.NamespaceDefault).Update(sa)
return err
})
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
Expand Down

0 comments on commit ce7aba5

Please sign in to comment.