Skip to content

Commit

Permalink
Merge pull request kubernetes#17939 from wojtek-t/debug_test
Browse files Browse the repository at this point in the history
Auto commit by PR queue bot
k8s-merge-robot committed Nov 30, 2015
2 parents 63dc126 + 0773eb0 commit 494364d
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion test/e2e/resize_nodes.go
Original file line number Diff line number Diff line change
@@ -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 {
// Add "name": name to the labels, overwriting if it exists.
labels["name"] = name
gracePeriod := int64(0)
return &api.ReplicationController{
TypeMeta: unversioned.TypeMeta{
Kind: "ReplicationController",
@@ -203,7 +204,8 @@ func rcByNameContainer(name string, replicas int, image string, labels map[strin
Labels: labels,
},
Spec: api.PodSpec{
Containers: []api.Container{c},
Containers: []api.Container{c},
TerminationGracePeriodSeconds: &gracePeriod,
},
},
},
5 changes: 4 additions & 1 deletion test/e2e/util.go
Original file line number Diff line number Diff line change
@@ -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.
func waitForRCPodToDisappear(c *client.Client, ns, rcName, podName string) error {
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)

0 comments on commit 494364d

Please sign in to comment.