Skip to content
This repository has been archived by the owner on Jun 14, 2019. It is now read-only.

Commit

Permalink
waitForPodDeletion returns nil when pod is successfully removed
Browse files Browse the repository at this point in the history
  • Loading branch information
vrutkovs committed Jun 3, 2019
1 parent 93f52a7 commit abb16d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/steps/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,8 @@ func waitForPodDeletion(podClient coreclientset.PodInterface, name string, uid t
// Wait for pod to be completed
for i := 0; i < timeout; i += 2 {
if _, err := checkPodExists(podClient, name, uid); err != nil {
return err
// non-nil err means pod is now gone, so waitForPodDeletion returns `nil` here
return nil
}
log.Printf("Waiting for pod %s to be deleted ... (%ds/%d)", name, i, timeout)
time.Sleep(2 * time.Second)
Expand Down

0 comments on commit abb16d4

Please sign in to comment.