From 2b554b4286ebb33733a44892a664c601f2dcfef9 Mon Sep 17 00:00:00 2001 From: Wei Huang Date: Wed, 13 Mar 2019 11:54:16 -0700 Subject: [PATCH] scheduler: cleanup unused parameters in unschedulableQ --- pkg/scheduler/internal/queue/scheduling_queue.go | 4 ++-- pkg/scheduler/internal/queue/scheduling_queue_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/scheduler/internal/queue/scheduling_queue.go b/pkg/scheduler/internal/queue/scheduling_queue.go index 1a3a087766..3267bed242 100644 --- a/pkg/scheduler/internal/queue/scheduling_queue.go +++ b/pkg/scheduler/internal/queue/scheduling_queue.go @@ -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, diff --git a/pkg/scheduler/internal/queue/scheduling_queue_test.go b/pkg/scheduler/internal/queue/scheduling_queue_test.go index db12c27072..91f4dc7abb 100644 --- a/pkg/scheduler/internal/queue/scheduling_queue_test.go +++ b/pkg/scheduler/internal/queue/scheduling_queue_test.go @@ -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)) }