Use PodInfo instead of Pod for nominatedPods and QueuedPodInfo

This commit is contained in:
drfish
2021-02-22 22:00:23 +08:00
parent 84483a5aac
commit bc2df9de72
14 changed files with 319 additions and 288 deletions

View File

@@ -357,7 +357,7 @@ func TestSchedulerScheduleOne(t *testing.T) {
gotError = err
},
NextPod: func() *framework.QueuedPodInfo {
return &framework.QueuedPodInfo{Pod: item.sendPod}
return &framework.QueuedPodInfo{PodInfo: framework.NewPodInfo(item.sendPod)}
},
Profiles: profile.Map{
testSchedulerName: fwk,
@@ -838,7 +838,7 @@ func setupTestScheduler(queuedPodStore *clientcache.FIFO, scache internalcache.C
SchedulerCache: scache,
Algorithm: algo,
NextPod: func() *framework.QueuedPodInfo {
return &framework.QueuedPodInfo{Pod: clientcache.Pop(queuedPodStore).(*v1.Pod)}
return &framework.QueuedPodInfo{PodInfo: framework.NewPodInfo(clientcache.Pop(queuedPodStore).(*v1.Pod))}
},
Error: func(p *framework.QueuedPodInfo, err error) {
errChan <- err