Merge pull request #75343 from Huang-Wei/scheduler-cleanup

scheduler: cleanup unused parameters in unschedulableQ
k3s-v1.15.3
Kubernetes Prow Robot 2019-03-20 11:08:27 -07:00 committed by GitHub
commit 9feb23e5f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -297,7 +297,7 @@ func NewPriorityQueueWithClock(stop <-chan struct{}, clock util.Clock) *Priority
stop: stop,
podBackoff: util.CreatePodBackoffWithClock(1*time.Second, 10*time.Second, clock),
activeQ: util.NewHeap(podInfoKeyFunc, activeQComp),
unschedulableQ: newUnschedulablePodsMap(clock),
unschedulableQ: newUnschedulablePodsMap(),
nominatedPods: newNominatedPodMap(),
moveRequestCycle: -1,
}
@ -818,7 +818,7 @@ func (u *UnschedulablePodsMap) clear() {
}
// newUnschedulablePodsMap initializes a new object of UnschedulablePodsMap.
func newUnschedulablePodsMap(clock util.Clock) *UnschedulablePodsMap {
func newUnschedulablePodsMap() *UnschedulablePodsMap {
return &UnschedulablePodsMap{
podInfoMap: make(map[string]*podInfo),
keyFunc: util.GetPodFullName,

View File

@ -647,7 +647,7 @@ func TestUnschedulablePodsMap(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
upm := newUnschedulablePodsMap(nil)
upm := newUnschedulablePodsMap()
for _, p := range test.podsToAdd {
upm.addOrUpdate(newPodInfoNoTimestamp(p))
}