Disable equivalence cache by default in the scheduler integration tests

This commit is contained in:
Bobby (Babak) Salamat 2018-11-13 10:59:38 -08:00
parent bfb95290b9
commit 1b8e1d9ed8
4 changed files with 8 additions and 11 deletions

View File

@ -111,7 +111,7 @@ func setupScheduler(
PdbInformer: informerFactory.Policy().V1beta1().PodDisruptionBudgets(), PdbInformer: informerFactory.Policy().V1beta1().PodDisruptionBudgets(),
StorageClassInformer: informerFactory.Storage().V1().StorageClasses(), StorageClassInformer: informerFactory.Storage().V1().StorageClasses(),
HardPodAffinitySymmetricWeight: v1.DefaultHardPodAffinitySymmetricWeight, HardPodAffinitySymmetricWeight: v1.DefaultHardPodAffinitySymmetricWeight,
EnableEquivalenceClassCache: true, EnableEquivalenceClassCache: false,
DisablePreemption: false, DisablePreemption: false,
PercentageOfNodesToScore: 100, PercentageOfNodesToScore: 100,
}) })

View File

@ -148,7 +148,7 @@ func initTestScheduler(
) *TestContext { ) *TestContext {
// Pod preemption is enabled by default scheduler configuration, but preemption only happens when PodPriority // Pod preemption is enabled by default scheduler configuration, but preemption only happens when PodPriority
// feature gate is enabled at the same time. // feature gate is enabled at the same time.
return initTestSchedulerWithOptions(t, context, setPodInformer, policy, false, false, time.Second) return initTestSchedulerWithOptions(t, context, setPodInformer, policy, false, true, time.Second)
} }
// initTestSchedulerWithOptions initializes a test environment and creates a scheduler with default // initTestSchedulerWithOptions initializes a test environment and creates a scheduler with default
@ -257,7 +257,7 @@ func initTest(t *testing.T, nsPrefix string) *TestContext {
// configuration but with pod preemption disabled. // configuration but with pod preemption disabled.
func initTestDisablePreemption(t *testing.T, nsPrefix string) *TestContext { func initTestDisablePreemption(t *testing.T, nsPrefix string) *TestContext {
return initTestSchedulerWithOptions( return initTestSchedulerWithOptions(
t, initTestMaster(t, nsPrefix, nil), true, nil, true, false, time.Second) t, initTestMaster(t, nsPrefix, nil), true, nil, true, true, time.Second)
} }
// cleanupTest deletes the scheduler and the test namespace. It should be called // cleanupTest deletes the scheduler and the test namespace. It should be called

View File

@ -99,7 +99,7 @@ func TestVolumeBinding(t *testing.T) {
"VolumeScheduling": true, "VolumeScheduling": true,
"PersistentLocalVolumes": true, "PersistentLocalVolumes": true,
} }
config := setupCluster(t, "volume-scheduling-", 2, features, 0, 0, false) config := setupCluster(t, "volume-scheduling-", 2, features, 0, 0, true)
defer config.teardown() defer config.teardown()
cases := map[string]struct { cases := map[string]struct {
@ -272,7 +272,7 @@ func TestVolumeBindingRescheduling(t *testing.T) {
"VolumeScheduling": true, "VolumeScheduling": true,
"PersistentLocalVolumes": true, "PersistentLocalVolumes": true,
} }
config := setupCluster(t, "volume-scheduling-", 2, features, 0, 0, false) config := setupCluster(t, "volume-scheduling-", 2, features, 0, 0, true)
defer config.teardown() defer config.teardown()
storageClassName := "local-storage" storageClassName := "local-storage"
@ -418,7 +418,7 @@ func testVolumeBindingStress(t *testing.T, schedulerResyncPeriod time.Duration,
"VolumeScheduling": true, "VolumeScheduling": true,
"PersistentLocalVolumes": true, "PersistentLocalVolumes": true,
} }
config := setupCluster(t, "volume-binding-stress-", 1, features, schedulerResyncPeriod, provisionDelaySeconds, false) config := setupCluster(t, "volume-binding-stress-", 1, features, schedulerResyncPeriod, provisionDelaySeconds, true)
defer config.teardown() defer config.teardown()
// Set max volume limit to the number of PVCs the test will create // Set max volume limit to the number of PVCs the test will create
@ -625,7 +625,7 @@ func TestPVAffinityConflict(t *testing.T) {
"VolumeScheduling": true, "VolumeScheduling": true,
"PersistentLocalVolumes": true, "PersistentLocalVolumes": true,
} }
config := setupCluster(t, "volume-scheduling-", 3, features, 0, 0, false) config := setupCluster(t, "volume-scheduling-", 3, features, 0, 0, true)
defer config.teardown() defer config.teardown()
pv := makePV("local-pv", classImmediate, "", "", node1) pv := makePV("local-pv", classImmediate, "", "", node1)
@ -688,7 +688,7 @@ func TestVolumeProvision(t *testing.T) {
"VolumeScheduling": true, "VolumeScheduling": true,
"PersistentLocalVolumes": true, "PersistentLocalVolumes": true,
} }
config := setupCluster(t, "volume-scheduling", 1, features, 0, 0, false) config := setupCluster(t, "volume-scheduling", 1, features, 0, 0, true)
defer config.teardown() defer config.teardown()
cases := map[string]struct { cases := map[string]struct {

View File

@ -94,9 +94,6 @@ func createSchedulerConfigurator(
informerFactory informers.SharedInformerFactory, informerFactory informers.SharedInformerFactory,
stopCh <-chan struct{}, stopCh <-chan struct{},
) factory.Configurator { ) factory.Configurator {
// Enable EnableEquivalenceClassCache for all integration tests.
utilfeature.DefaultFeatureGate.Set("EnableEquivalenceClassCache=true")
return factory.NewConfigFactory(&factory.ConfigFactoryArgs{ return factory.NewConfigFactory(&factory.ConfigFactoryArgs{
SchedulerName: v1.DefaultSchedulerName, SchedulerName: v1.DefaultSchedulerName,
Client: clientSet, Client: clientSet,