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
494364da
Commit
494364da
authored
Nov 30, 2015
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #17939 from wojtek-t/debug_test
Auto commit by PR queue bot
parents
63dc1267
0773eb03
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
resize_nodes.go
test/e2e/resize_nodes.go
+2
-0
util.go
test/e2e/util.go
+4
-1
No files found.
test/e2e/resize_nodes.go
View file @
494364da
...
@@ -185,6 +185,7 @@ func rcByNamePort(name string, replicas int, image string, port int, labels map[
...
@@ -185,6 +185,7 @@ func rcByNamePort(name string, replicas int, image string, port int, labels map[
func
rcByNameContainer
(
name
string
,
replicas
int
,
image
string
,
labels
map
[
string
]
string
,
c
api
.
Container
)
*
api
.
ReplicationController
{
func
rcByNameContainer
(
name
string
,
replicas
int
,
image
string
,
labels
map
[
string
]
string
,
c
api
.
Container
)
*
api
.
ReplicationController
{
// Add "name": name to the labels, overwriting if it exists.
// Add "name": name to the labels, overwriting if it exists.
labels
[
"name"
]
=
name
labels
[
"name"
]
=
name
gracePeriod
:=
int64
(
0
)
return
&
api
.
ReplicationController
{
return
&
api
.
ReplicationController
{
TypeMeta
:
unversioned
.
TypeMeta
{
TypeMeta
:
unversioned
.
TypeMeta
{
Kind
:
"ReplicationController"
,
Kind
:
"ReplicationController"
,
...
@@ -204,6 +205,7 @@ func rcByNameContainer(name string, replicas int, image string, labels map[strin
...
@@ -204,6 +205,7 @@ func rcByNameContainer(name string, replicas int, image string, labels map[strin
},
},
Spec
:
api
.
PodSpec
{
Spec
:
api
.
PodSpec
{
Containers
:
[]
api
.
Container
{
c
},
Containers
:
[]
api
.
Container
{
c
},
TerminationGracePeriodSeconds
:
&
gracePeriod
,
},
},
},
},
},
},
...
...
test/e2e/util.go
View file @
494364da
...
@@ -768,7 +768,10 @@ func waitForPodToDisappear(c *client.Client, ns, podName string, label labels.Se
...
@@ -768,7 +768,10 @@ func waitForPodToDisappear(c *client.Client, ns, podName string, label labels.Se
// In case of failure or too long waiting time, an error is returned.
// In case of failure or too long waiting time, an error is returned.
func
waitForRCPodToDisappear
(
c
*
client
.
Client
,
ns
,
rcName
,
podName
string
)
error
{
func
waitForRCPodToDisappear
(
c
*
client
.
Client
,
ns
,
rcName
,
podName
string
)
error
{
label
:=
labels
.
SelectorFromSet
(
labels
.
Set
(
map
[
string
]
string
{
"name"
:
rcName
}))
label
:=
labels
.
SelectorFromSet
(
labels
.
Set
(
map
[
string
]
string
{
"name"
:
rcName
}))
return
waitForPodToDisappear
(
c
,
ns
,
podName
,
label
,
20
*
time
.
Second
,
5
*
time
.
Minute
)
// NodeController evicts pod after 5 minutes, so we need timeout greater than that.
// Additionally, there can be non-zero grace period, so we are setting 10 minutes
// to be on the safe size.
return
waitForPodToDisappear
(
c
,
ns
,
podName
,
label
,
20
*
time
.
Second
,
10
*
time
.
Minute
)
}
}
// waitForService waits until the service appears (exist == true), or disappears (exist == false)
// waitForService waits until the service appears (exist == true), or disappears (exist == false)
...
...
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