Merge pull request #15772 from mesosphere/sttts-temporarily-fix-nodeselector-e2e-test

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot
2015-10-18 04:35:14 -07:00

View File

@@ -442,7 +442,13 @@ var _ = Describe("SchedulerPredicates", func() {
})
expectNoError(err)
defer c.Pods(ns).Delete(labelPodName, api.NewDeleteOptions(0))
expectNoError(waitForPodRunningInNamespace(c, labelPodName, ns))
// check that pod got scheduled. We intentionally DO NOT check that the
// pod is running because this will create a race condition with the
// kubelet and the scheduler: the scheduler might have scheduled a pod
// already when the kubelet does not know about its new label yet. The
// kubelet will then refuse to launch the pod.
expectNoError(waitForPodNotPending(c, ns, labelPodName))
labelPod, err := c.Pods(ns).Get(labelPodName)
expectNoError(err)
Expect(labelPod.Spec.NodeName).To(Equal(nodeName))