Merge pull request #8779 from wojtek-t/failing_rc_delete

Increase timeout for deleting RC in e2e tests.
This commit is contained in:
Filip Grzadkowski 2015-05-26 01:43:34 -07:00
commit 39483ffa90
2 changed files with 8 additions and 1 deletions

View File

@ -60,6 +60,10 @@ func ReaperFor(kind string, c client.Interface) (Reaper, error) {
return nil, &NoSuchReaperError{kind}
}
func ReaperForReplicationController(c client.Interface, timeout time.Duration) (Reaper, error) {
return &ReplicationControllerReaper{c, Interval, timeout}, nil
}
type ReplicationControllerReaper struct {
client.Interface
pollInterval, timeout time.Duration

View File

@ -828,11 +828,14 @@ func waitForRCPodsRunning(c *client.Client, ns, rcName string) error {
// Delete a Replication Controller and all pods it spawned
func DeleteRC(c *client.Client, ns, name string) error {
By(fmt.Sprintf("Deleting replication controller %s in namespace %s", name, ns))
reaper, err := kubectl.ReaperFor("ReplicationController", c)
reaper, err := kubectl.ReaperForReplicationController(c, 10*time.Minute)
if err != nil {
return err
}
startTime := time.Now()
_, err = reaper.Stop(ns, name, api.NewDeleteOptions(0))
deleteRCTime := time.Now().Sub(startTime)
Logf("Deleting RC took: %v", deleteRCTime)
return err
}