Set 0 sync period in scheduler integration test

This commit is contained in:
Wei Huang
2020-10-29 12:27:46 -07:00
parent dd45603707
commit 185093bd4e
7 changed files with 9 additions and 11 deletions

View File

@@ -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), nil, time.Second, opts...)
testCtx := testutils.InitTestSchedulerWithOptions(t, testutils.InitTestMaster(t, nsPrefix, nil), nil, opts...)
testutils.SyncInformerFactory(testCtx)
go testCtx.Scheduler.Run(testCtx.Ctx)
return testCtx
@@ -101,7 +101,7 @@ func initTestDisablePreemption(t *testing.T, nsPrefix string) *testutils.TestCon
}
testCtx := testutils.InitTestSchedulerWithOptions(
t, testutils.InitTestMaster(t, nsPrefix, nil), nil,
time.Second, scheduler.WithProfiles(prof))
scheduler.WithProfiles(prof))
testutils.SyncInformerFactory(testCtx)
go testCtx.Scheduler.Run(testCtx.Ctx)
return testCtx