Merge pull request #21050 from caesarxuchao/fix-21045

Fix clientset e2e test flake
pull/6/head
Mike Danese 2016-02-11 13:12:39 -08:00
commit 34447ca3bd
1 changed files with 6 additions and 1 deletions

View File

@ -89,12 +89,17 @@ var _ = Describe("Generated release_1_2 clientset", func() {
// the test so we can ensure that we clean up after // the test so we can ensure that we clean up after
// ourselves // ourselves
defer podClient.Delete(pod.Name, api.NewDeleteOptions(0)) defer podClient.Delete(pod.Name, api.NewDeleteOptions(0))
_, err = podClient.Create(pod) pod, err = podClient.Create(pod)
if err != nil { if err != nil {
Failf("Failed to create pod: %v", err) Failf("Failed to create pod: %v", err)
} }
By("verifying the pod is in kubernetes") By("verifying the pod is in kubernetes")
selector = labels.SelectorFromSet(labels.Set(map[string]string{"time": value}))
options = api.ListOptions{
LabelSelector: selector,
ResourceVersion: pod.ResourceVersion,
}
pods, err = podClient.List(options) pods, err = podClient.List(options)
if err != nil { if err != nil {
Failf("Failed to query for pods: %v", err) Failf("Failed to query for pods: %v", err)