mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Initialize scheduler's podInformer in sharedInformerFactory
Scheduler's specific podInfomer is now initialized inside the sahredInformerFactory.
This commit is contained in:
@@ -80,7 +80,7 @@ func initDisruptionController(t *testing.T, testCtx *testutils.TestContext) *dis
|
||||
// initTest initializes a test environment and creates master and scheduler with default
|
||||
// configuration.
|
||||
func initTest(t *testing.T, nsPrefix string, opts ...scheduler.Option) *testutils.TestContext {
|
||||
testCtx := testutils.InitTestSchedulerWithOptions(t, testutils.InitTestMaster(t, nsPrefix, nil), true, nil, time.Second, opts...)
|
||||
testCtx := testutils.InitTestSchedulerWithOptions(t, testutils.InitTestMaster(t, nsPrefix, nil), nil, time.Second, opts...)
|
||||
testutils.SyncInformerFactory(testCtx)
|
||||
go testCtx.Scheduler.Run(testCtx.Ctx)
|
||||
return testCtx
|
||||
@@ -100,7 +100,7 @@ func initTestDisablePreemption(t *testing.T, nsPrefix string) *testutils.TestCon
|
||||
},
|
||||
}
|
||||
testCtx := testutils.InitTestSchedulerWithOptions(
|
||||
t, testutils.InitTestMaster(t, nsPrefix, nil), true, nil,
|
||||
t, testutils.InitTestMaster(t, nsPrefix, nil), nil,
|
||||
time.Second, scheduler.WithProfiles(prof))
|
||||
testutils.SyncInformerFactory(testCtx)
|
||||
go testCtx.Scheduler.Run(testCtx.Ctx)
|
||||
|
||||
Reference in New Issue
Block a user