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
d05a4339
Commit
d05a4339
authored
Oct 27, 2015
by
Sam Abed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove back-off exponential test and adjust timing
Signed-off-by:
Sam Abed
<
samsabed@gmail.com
>
parent
c8a17837
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
34 deletions
+1
-34
pods.go
test/e2e/pods.go
+1
-34
No files found.
test/e2e/pods.go
View file @
d05a4339
...
@@ -828,39 +828,6 @@ var _ = Describe("Pods", func() {
...
@@ -828,39 +828,6 @@ var _ = Describe("Pods", func() {
}
}
})
})
It
(
"should have their container restart back-off timer increase exponentially"
,
func
()
{
podName
:=
"pod-back-off-exponentially"
containerName
:=
"back-off"
podClient
:=
framework
.
Client
.
Pods
(
framework
.
Namespace
.
Name
)
pod
:=
&
api
.
Pod
{
ObjectMeta
:
api
.
ObjectMeta
{
Name
:
podName
,
Labels
:
map
[
string
]
string
{
"test"
:
"back-off-image"
},
},
Spec
:
api
.
PodSpec
{
Containers
:
[]
api
.
Container
{
{
Name
:
containerName
,
Image
:
"gcr.io/google_containers/busybox"
,
Command
:
[]
string
{
"/bin/sh"
,
"-c"
,
"sleep 5"
,
"/crash/missing"
},
},
},
},
}
defer
func
()
{
By
(
"deleting the pod"
)
podClient
.
Delete
(
pod
.
Name
,
api
.
NewDeleteOptions
(
0
))
}()
delay1
,
delay2
:=
startPodAndGetBackOffs
(
framework
,
pod
,
podName
,
containerName
,
buildBackOffDuration
)
delay1
+=
1
// divide by zero
ratio
:=
float64
(
delay2
)
/
float64
(
delay1
)
if
math
.
Floor
(
ratio
)
!=
2
&&
math
.
Ceil
(
ratio
)
!=
2
{
Failf
(
"back-off gap is not increasing exponentially pod=%s/%s delay1=%s delay2=%s"
,
podName
,
containerName
,
delay1
,
delay2
)
}
})
It
(
"should have their auto-restart back-off timer reset on image update"
,
func
()
{
It
(
"should have their auto-restart back-off timer reset on image update"
,
func
()
{
podName
:=
"pod-back-off-image"
podName
:=
"pod-back-off-image"
containerName
:=
"back-off"
containerName
:=
"back-off"
...
@@ -907,7 +874,7 @@ var _ = Describe("Pods", func() {
...
@@ -907,7 +874,7 @@ var _ = Describe("Pods", func() {
Failf
(
"timed out waiting for container restart in pod=%s/%s"
,
podName
,
containerName
)
Failf
(
"timed out waiting for container restart in pod=%s/%s"
,
podName
,
containerName
)
}
}
if
delayAfterUpdate
>
delay2
||
delayAfterUpdate
>
delay1
{
if
delayAfterUpdate
>
2
*
delay2
||
delayAfterUpdate
>
2
*
delay1
{
Failf
(
"updating image did not reset the back-off value in pod=%s/%s d3=%s d2=%s d1=%s"
,
podName
,
containerName
,
delayAfterUpdate
,
delay1
,
delay2
)
Failf
(
"updating image did not reset the back-off value in pod=%s/%s d3=%s d2=%s d1=%s"
,
podName
,
containerName
,
delayAfterUpdate
,
delay1
,
delay2
)
}
}
})
})
...
...
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