fix flaky host cleanup test

This commit is contained in:
Jeff Vance
2017-02-08 20:09:13 -08:00
parent e538adcd00
commit 32a07cbedc
2 changed files with 69 additions and 47 deletions

View File

@@ -408,13 +408,10 @@ func deletePodWithWait(f *framework.Framework, c clientset.Interface, pod *v1.Po
Expect(err).NotTo(HaveOccurred())
}
// wait for pod to terminate. Expect apierr NotFound
// wait for pod to terminate
err = f.WaitForPodTerminated(pod.Name, "")
Expect(err).To(HaveOccurred())
if !apierrs.IsNotFound(err) {
framework.Logf("Error! Expected IsNotFound error deleting pod %q, instead got: %v", pod.Name, err)
Expect(apierrs.IsNotFound(err)).To(BeTrue())
}
Expect(apierrs.IsNotFound(err)).To(BeTrue(), fmt.Sprintf("Expected IsNotFound error deleting pod %q, instead got: %v", pod.Name, err))
framework.Logf("Ignore \"not found\" error above. Pod %v successfully deleted", pod.Name)
}