Skip scheduling the pod if it has been assumed and the pod updates could be skipped.

This commit is contained in:
Jun Gong
2019-12-13 09:40:50 +08:00
parent cfdfd043a0
commit 706e90a033
2 changed files with 26 additions and 3 deletions

View File

@@ -309,6 +309,12 @@ func TestScheduler(t *testing.T) {
AssumeFunc: func(pod *v1.Pod) {
gotAssumedPod = pod
},
IsAssumedPodFunc: func(pod *v1.Pod) bool {
if pod == nil || gotAssumedPod == nil {
return false
}
return pod.UID == gotAssumedPod.UID
},
}
s := &Scheduler{