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
bd21b031
Commit
bd21b031
authored
Nov 02, 2016
by
gmarek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create multiple clients in Density test and remove unused 'interval'
parent
91f0f2c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
density.go
test/e2e/density.go
+14
-10
No files found.
test/e2e/density.go
View file @
bd21b031
...
@@ -47,6 +47,7 @@ import (
...
@@ -47,6 +47,7 @@ import (
const
(
const
(
MinSaturationThreshold
=
2
*
time
.
Minute
MinSaturationThreshold
=
2
*
time
.
Minute
MinPodsPerSecondThroughput
=
8
MinPodsPerSecondThroughput
=
8
DensityPollInterval
=
10
*
time
.
Second
)
)
// Maximum container failures this test tolerates before failing.
// Maximum container failures this test tolerates before failing.
...
@@ -356,11 +357,11 @@ var _ = framework.KubeDescribe("Density", func() {
...
@@ -356,11 +357,11 @@ var _ = framework.KubeDescribe("Density", func() {
densityTests
:=
[]
Density
{
densityTests
:=
[]
Density
{
// TODO: Expose runLatencyTest as ginkgo flag.
// TODO: Expose runLatencyTest as ginkgo flag.
{
podsPerNode
:
3
,
runLatencyTest
:
false
,
interval
:
10
*
time
.
Second
},
{
podsPerNode
:
3
,
runLatencyTest
:
false
},
{
podsPerNode
:
30
,
runLatencyTest
:
true
,
interval
:
10
*
time
.
Second
},
{
podsPerNode
:
30
,
runLatencyTest
:
true
},
{
podsPerNode
:
50
,
runLatencyTest
:
false
,
interval
:
10
*
time
.
Second
},
{
podsPerNode
:
50
,
runLatencyTest
:
false
},
{
podsPerNode
:
95
,
runLatencyTest
:
true
,
interval
:
10
*
time
.
Second
},
{
podsPerNode
:
95
,
runLatencyTest
:
true
},
{
podsPerNode
:
100
,
runLatencyTest
:
false
,
interval
:
10
*
time
.
Second
},
{
podsPerNode
:
100
,
runLatencyTest
:
false
},
}
}
for
_
,
testArg
:=
range
densityTests
{
for
_
,
testArg
:=
range
densityTests
{
...
@@ -401,15 +402,18 @@ var _ = framework.KubeDescribe("Density", func() {
...
@@ -401,15 +402,18 @@ var _ = framework.KubeDescribe("Density", func() {
// has to assume that it will be run at the very end.
// has to assume that it will be run at the very end.
podThroughput
:=
20
podThroughput
:=
20
timeout
:=
time
.
Duration
(
totalPods
/
podThroughput
)
*
time
.
Second
+
3
*
time
.
Minute
timeout
:=
time
.
Duration
(
totalPods
/
podThroughput
)
*
time
.
Second
+
3
*
time
.
Minute
// createClients is defined in load.go
clients
,
err
:=
createClients
(
numberOfRCs
)
for
i
:=
0
;
i
<
numberOfRCs
;
i
++
{
for
i
:=
0
;
i
<
numberOfRCs
;
i
++
{
RCName
:=
fmt
.
Sprintf
(
"density%v-%v-%v"
,
totalPods
,
i
,
uuid
)
RCName
:=
fmt
.
Sprintf
(
"density%v-%v-%v"
,
totalPods
,
i
,
uuid
)
nsName
:=
namespaces
[
i
]
.
Name
nsName
:=
namespaces
[
i
]
.
Name
RCConfigs
[
i
]
=
testutils
.
RCConfig
{
Client
:
c
,
RCConfigs
[
i
]
=
testutils
.
RCConfig
{
Client
:
clients
[
i
],
Image
:
framework
.
GetPauseImageName
(
f
.
ClientSet
),
Image
:
framework
.
GetPauseImageName
(
f
.
ClientSet
),
Name
:
RCName
,
Name
:
RCName
,
Namespace
:
nsName
,
Namespace
:
nsName
,
Labels
:
map
[
string
]
string
{
"type"
:
"densityPod"
},
Labels
:
map
[
string
]
string
{
"type"
:
"densityPod"
},
PollInterval
:
itArg
.
i
nterval
,
PollInterval
:
DensityPollI
nterval
,
Timeout
:
timeout
,
Timeout
:
timeout
,
PodStatusFile
:
fileHndl
,
PodStatusFile
:
fileHndl
,
Replicas
:
(
totalPods
+
numberOfRCs
-
1
)
/
numberOfRCs
,
Replicas
:
(
totalPods
+
numberOfRCs
-
1
)
/
numberOfRCs
,
...
@@ -424,7 +428,7 @@ var _ = framework.KubeDescribe("Density", func() {
...
@@ -424,7 +428,7 @@ var _ = framework.KubeDescribe("Density", func() {
ClientSet
:
f
.
ClientSet
,
ClientSet
:
f
.
ClientSet
,
Configs
:
RCConfigs
,
Configs
:
RCConfigs
,
PodCount
:
totalPods
,
PodCount
:
totalPods
,
PollInterval
:
itArg
.
i
nterval
,
PollInterval
:
DensityPollI
nterval
,
}
}
e2eStartupTime
=
runDensityTest
(
dConfig
)
e2eStartupTime
=
runDensityTest
(
dConfig
)
if
itArg
.
runLatencyTest
{
if
itArg
.
runLatencyTest
{
...
@@ -665,7 +669,7 @@ var _ = framework.KubeDescribe("Density", func() {
...
@@ -665,7 +669,7 @@ var _ = framework.KubeDescribe("Density", func() {
Name
:
RCName
,
Name
:
RCName
,
Namespace
:
ns
,
Namespace
:
ns
,
Labels
:
map
[
string
]
string
{
"type"
:
"densityPod"
},
Labels
:
map
[
string
]
string
{
"type"
:
"densityPod"
},
PollInterval
:
10
*
time
.
Second
,
PollInterval
:
DensityPollInterval
,
PodStatusFile
:
fileHndl
,
PodStatusFile
:
fileHndl
,
Replicas
:
podsPerRC
,
Replicas
:
podsPerRC
,
MaxContainerFailures
:
&
MaxContainerFailures
,
MaxContainerFailures
:
&
MaxContainerFailures
,
...
@@ -676,7 +680,7 @@ var _ = framework.KubeDescribe("Density", func() {
...
@@ -676,7 +680,7 @@ var _ = framework.KubeDescribe("Density", func() {
ClientSet
:
f
.
ClientSet
,
ClientSet
:
f
.
ClientSet
,
Configs
:
RCConfigs
,
Configs
:
RCConfigs
,
PodCount
:
totalPods
,
PodCount
:
totalPods
,
PollInterval
:
10
*
time
.
Second
,
PollInterval
:
DensityPollInterval
,
}
}
e2eStartupTime
=
runDensityTest
(
dConfig
)
e2eStartupTime
=
runDensityTest
(
dConfig
)
cleanupDensityTest
(
dConfig
)
cleanupDensityTest
(
dConfig
)
...
...
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