Remove newScheduler to simplify instantiation
Signed-off-by: kerthcet <kerthcet@gmail.com>
This commit is contained in:
@@ -295,18 +295,16 @@ func TestSchedulerWithExtenders(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
scheduler := newScheduler(
|
||||
cache,
|
||||
extenders,
|
||||
nil,
|
||||
nil,
|
||||
nil,
|
||||
nil,
|
||||
nil,
|
||||
emptySnapshot,
|
||||
schedulerapi.DefaultPercentageOfNodesToScore)
|
||||
sched := &Scheduler{
|
||||
Cache: cache,
|
||||
nodeInfoSnapshot: emptySnapshot,
|
||||
percentageOfNodesToScore: schedulerapi.DefaultPercentageOfNodesToScore,
|
||||
Extenders: extenders,
|
||||
}
|
||||
sched.applyDefaultHandlers()
|
||||
|
||||
podIgnored := &v1.Pod{}
|
||||
result, err := scheduler.SchedulePod(ctx, fwk, framework.NewCycleState(), podIgnored)
|
||||
result, err := sched.SchedulePod(ctx, fwk, framework.NewCycleState(), podIgnored)
|
||||
if test.expectsErr {
|
||||
if err == nil {
|
||||
t.Errorf("Unexpected non-error, result %+v", result)
|
||||
|
Reference in New Issue
Block a user