Move users of factory.NewConfigFactory to scheduler.New

This commit is contained in:
Guoliang Wang
2018-12-08 11:26:41 +08:00
parent 13e59ab9ad
commit 3c24c99b08
10 changed files with 131 additions and 258 deletions

View File

@@ -212,12 +212,7 @@ func initTestSchedulerWithOptions(
context.informerFactory.Start(context.schedulerConfig.StopEverything)
context.informerFactory.WaitForCacheSync(context.schedulerConfig.StopEverything)
context.scheduler, err = scheduler.NewFromConfigurator(&scheduler.FakeConfigurator{
Config: context.schedulerConfig},
nil...)
if err != nil {
t.Fatalf("Couldn't create scheduler: %v", err)
}
context.scheduler = scheduler.NewFromConfig(context.schedulerConfig)
context.scheduler.Run()
return context
}