Skip to content

Commit

Permalink
Fix inverted logic - wait for the pod to stop existing. (#1648)
Browse files Browse the repository at this point in the history
Might be the reason we have been seeing flakiness in test runs.

Signed-off-by: Tomasz Baranski <tbaransk@redhat.com>
Signed-off-by: Maya Rashish <mrashish@redhat.com>

Co-authored-by: Maya Rashish <mrashish@redhat.com>
  • Loading branch information
kubevirt-bot and maya-r committed Feb 10, 2021
1 parent 1b34375 commit fe36de4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/utils/pod.go
Expand Up @@ -52,7 +52,7 @@ func DeletePodByName(clientSet *kubernetes.Clientset, podName, namespace string,
})
return wait.PollImmediate(2*time.Second, podDeleteTime, func() (bool, error) {
_, err := clientSet.CoreV1().Pods(namespace).Get(context.TODO(), podName, metav1.GetOptions{})
if !errors.IsNotFound(err) {
if errors.IsNotFound(err) {
return true, nil
}
return false, err
Expand Down

0 comments on commit fe36de4

Please sign in to comment.