Skip to content

Commit

Permalink
trt-1538: Move cleanup check inside namespace validation block
Browse files Browse the repository at this point in the history
  • Loading branch information
neisw committed Mar 1, 2024
1 parent 3cfd160 commit 2ada045
Showing 1 changed file with 7 additions and 7 deletions.
Expand Up @@ -294,15 +294,15 @@ func (w *availability) Cleanup(ctx context.Context) error {
if err := w.kubeClient.CoreV1().Namespaces().Delete(ctx, w.namespaceName, metav1.DeleteOptions{}); err != nil {
return err
}
}

startTime := time.Now()
err := wait.PollUntilContextTimeout(ctx, 15*time.Second, 15*time.Minute, true, w.namespaceDeleted)
if err != nil {
return err
}
startTime := time.Now()
err := wait.PollUntilContextTimeout(ctx, 15*time.Second, 15*time.Minute, true, w.namespaceDeleted)
if err != nil {
return err
}

klog.Infof("Deleting namespace: %s took %.2f seconds", w.namespaceName, time.Now().Sub(startTime).Seconds())
klog.Infof("Deleting namespace: %s took %.2f seconds", w.namespaceName, time.Now().Sub(startTime).Seconds())
}

return nil
}
Expand Down

0 comments on commit 2ada045

Please sign in to comment.