Skip to content

Commit

Permalink
don't stop polling if there is a not found error (#1076)
Browse files Browse the repository at this point in the history
Co-authored-by: Gabriel Freites <[email protected]>
  • Loading branch information
knative-prow-robot and gabo1208 authored Feb 23, 2023
1 parent d09a59b commit af30cd1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/e2e/rabbitmqcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ func patchConnectionSecret(ctx context.Context, namespace string, secretName str
err = wait.PollImmediate(interval, timeout, func() (bool, error) {
secret, err = kubeClient.Get(ctx).CoreV1().Secrets(namespace).Get(ctx, secretName, metav1.GetOptions{})
if err != nil {
return false, err
if apierrors.IsNotFound(err) {
log.Println(namespace, secretName, "not found", err)
// keep polling
return false, nil
}
}
return true, nil
})
Expand Down

0 comments on commit af30cd1

Please sign in to comment.