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
ac0a946d
Unverified
Commit
ac0a946d
authored
Feb 28, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Feb 28, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #74538 from MrHohn/e2e-service-latencies-flake
[e2e] Add acceptableFailureRatio to service latency test
parents
d761fe84
08e406b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
service_latency.go
test/e2e/network/service_latency.go
+10
-3
No files found.
test/e2e/network/service_latency.go
View file @
ac0a946d
...
...
@@ -71,6 +71,9 @@ var _ = SIGDescribe("Service endpoints latency", func() {
totalTrials
=
200
parallelTrials
=
15
minSampleSize
=
100
// Acceptable failure ratio for getting service latencies.
acceptableFailureRatio
=
.05
)
// Turn off rate limiting--it interferes with our measurements.
...
...
@@ -79,7 +82,7 @@ var _ = SIGDescribe("Service endpoints latency", func() {
defer
func
()
{
f
.
ClientSet
.
CoreV1
()
.
RESTClient
()
.
(
*
restclient
.
RESTClient
)
.
Throttle
=
oldThrottle
}()
failing
:=
sets
.
NewString
()
d
,
err
:=
runServiceLatencies
(
f
,
parallelTrials
,
totalTrials
)
d
,
err
:=
runServiceLatencies
(
f
,
parallelTrials
,
totalTrials
,
acceptableFailureRatio
)
if
err
!=
nil
{
failing
.
Insert
(
fmt
.
Sprintf
(
"Not all RC/pod/service trials succeeded: %v"
,
err
))
}
...
...
@@ -123,7 +126,7 @@ var _ = SIGDescribe("Service endpoints latency", func() {
})
})
func
runServiceLatencies
(
f
*
framework
.
Framework
,
inParallel
,
total
int
)
(
output
[]
time
.
Duration
,
err
error
)
{
func
runServiceLatencies
(
f
*
framework
.
Framework
,
inParallel
,
total
int
,
acceptableFailureRatio
float32
)
(
output
[]
time
.
Duration
,
err
error
)
{
cfg
:=
testutils
.
RCConfig
{
Client
:
f
.
ClientSet
,
InternalClient
:
f
.
InternalClientset
,
...
...
@@ -180,7 +183,11 @@ func runServiceLatencies(f *framework.Framework, inParallel, total int) (output
}
}
if
errCount
!=
0
{
return
output
,
fmt
.
Errorf
(
"got %v errors"
,
errCount
)
framework
.
Logf
(
"Got %d errors out of %d tries"
,
errCount
,
total
)
errRatio
:=
float32
(
errCount
)
/
float32
(
total
)
if
errRatio
>
acceptableFailureRatio
{
return
output
,
fmt
.
Errorf
(
"error ratio %g is higher than the acceptable ratio %g"
,
errRatio
,
acceptableFailureRatio
)
}
}
return
output
,
nil
}
...
...
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