Merge pull request #27364 from gmarek/schedulerPredicates

Automatic merge from submit-queue

Fix SchedulerPredictes resources test

Fix #27115 (the part that's not a dupe).

cc @fejta
This commit is contained in:
k8s-merge-robot 2016-06-16 14:45:38 -07:00 committed by GitHub
commit 3c7f70543b

View File

@ -297,7 +297,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() {
framework.ExpectNoError(err)
for _, pod := range pods.Items {
_, found := nodeToCapacityMap[pod.Spec.NodeName]
if found && pod.Status.Phase == api.PodRunning {
if found && pod.Status.Phase != api.PodSucceeded && pod.Status.Phase != api.PodFailed {
framework.Logf("Pod %v requesting resource cpu=%vm on Node %v", pod.Name, getRequestedCPU(pod), pod.Spec.NodeName)
nodeToCapacityMap[pod.Spec.NodeName] -= getRequestedCPU(pod)
}