mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #8779 from wojtek-t/failing_rc_delete
Increase timeout for deleting RC in e2e tests.
This commit is contained in:
commit
39483ffa90
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user