Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
1b8e1d9e
Commit
1b8e1d9e
authored
Nov 13, 2018
by
Bobby (Babak) Salamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable equivalence cache by default in the scheduler integration tests
parent
bfb95290
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
11 deletions
+8
-11
daemonset_test.go
test/integration/daemonset/daemonset_test.go
+1
-1
util.go
test/integration/scheduler/util.go
+2
-2
volume_binding_test.go
test/integration/scheduler/volume_binding_test.go
+5
-5
util.go
test/integration/util/util.go
+0
-3
No files found.
test/integration/daemonset/daemonset_test.go
View file @
1b8e1d9e
...
@@ -111,7 +111,7 @@ func setupScheduler(
...
@@ -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
:
tru
e
,
EnableEquivalenceClassCache
:
fals
e
,
DisablePreemption
:
false
,
DisablePreemption
:
false
,
PercentageOfNodesToScore
:
100
,
PercentageOfNodesToScore
:
100
,
})
})
...
...
test/integration/scheduler/util.go
View file @
1b8e1d9e
...
@@ -148,7 +148,7 @@ func initTestScheduler(
...
@@ -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
,
fals
e
,
time
.
Second
)
return
initTestSchedulerWithOptions
(
t
,
context
,
setPodInformer
,
policy
,
false
,
tru
e
,
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 {
...
@@ -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
,
fals
e
,
time
.
Second
)
t
,
initTestMaster
(
t
,
nsPrefix
,
nil
),
true
,
nil
,
true
,
tru
e
,
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
...
...
test/integration/scheduler/volume_binding_test.go
View file @
1b8e1d9e
...
@@ -99,7 +99,7 @@ func TestVolumeBinding(t *testing.T) {
...
@@ -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
,
fals
e
)
config
:=
setupCluster
(
t
,
"volume-scheduling-"
,
2
,
features
,
0
,
0
,
tru
e
)
defer
config
.
teardown
()
defer
config
.
teardown
()
cases
:=
map
[
string
]
struct
{
cases
:=
map
[
string
]
struct
{
...
@@ -272,7 +272,7 @@ func TestVolumeBindingRescheduling(t *testing.T) {
...
@@ -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
,
fals
e
)
config
:=
setupCluster
(
t
,
"volume-scheduling-"
,
2
,
features
,
0
,
0
,
tru
e
)
defer
config
.
teardown
()
defer
config
.
teardown
()
storageClassName
:=
"local-storage"
storageClassName
:=
"local-storage"
...
@@ -418,7 +418,7 @@ func testVolumeBindingStress(t *testing.T, schedulerResyncPeriod time.Duration,
...
@@ -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
,
fals
e
)
config
:=
setupCluster
(
t
,
"volume-binding-stress-"
,
1
,
features
,
schedulerResyncPeriod
,
provisionDelaySeconds
,
tru
e
)
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) {
...
@@ -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
,
fals
e
)
config
:=
setupCluster
(
t
,
"volume-scheduling-"
,
3
,
features
,
0
,
0
,
tru
e
)
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) {
...
@@ -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
,
fals
e
)
config
:=
setupCluster
(
t
,
"volume-scheduling"
,
1
,
features
,
0
,
0
,
tru
e
)
defer
config
.
teardown
()
defer
config
.
teardown
()
cases
:=
map
[
string
]
struct
{
cases
:=
map
[
string
]
struct
{
...
...
test/integration/util/util.go
View file @
1b8e1d9e
...
@@ -94,9 +94,6 @@ func createSchedulerConfigurator(
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment