Fix an "index out of bound" issue in scheduler preemption e2e

This commit is contained in:
Wei Huang 2020-02-26 17:05:46 -08:00
parent 5ceddce539
commit 517a41fe84
No known key found for this signature in database
GPG Key ID: BE5E9752F8B6E005

View File

@ -214,14 +214,14 @@ var _ = SIGDescribe("SchedulerPreemption [Serial]", func() {
if len(pods) == 0 {
priorityName = lowPriorityClassName
}
pods[i] = createPausePod(f, pausePodConfig{
pods = append(pods, createPausePod(f, pausePodConfig{
Name: fmt.Sprintf("pod%d-%v", i, priorityName),
PriorityClassName: priorityName,
Resources: &v1.ResourceRequirements{
Requests: podRes,
},
NodeName: node.Name,
})
}))
framework.Logf("Created pod: %v", pods[i].Name)
}
if len(pods) < 2 {