mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 16:06:51 +00:00
use default timeout for deletion
This commit is contained in:
@@ -103,9 +103,6 @@ const (
|
||||
// TODO: Make this 30 seconds once #4566 is resolved.
|
||||
PodStartTimeout = 5 * time.Minute
|
||||
|
||||
// How long to wait for the pod to no longer be running
|
||||
podNoLongerRunningTimeout = 30 * time.Second
|
||||
|
||||
// If there are any orphaned namespaces to clean up, this test is running
|
||||
// on a long lived cluster. A long wait here is preferably to spurious test
|
||||
// failures caused by leaked resources from a previous test run.
|
||||
@@ -1252,10 +1249,10 @@ func podRunning(c clientset.Interface, podName, namespace string) wait.Condition
|
||||
}
|
||||
}
|
||||
|
||||
// Waits default amount of time (podNoLongerRunningTimeout) for the specified pod to stop running.
|
||||
// Waits default amount of time (DefaultPodDeletionTimeout) for the specified pod to stop running.
|
||||
// Returns an error if timeout occurs first.
|
||||
func WaitForPodNoLongerRunningInNamespace(c clientset.Interface, podName, namespace string) error {
|
||||
return WaitTimeoutForPodNoLongerRunningInNamespace(c, podName, namespace, podNoLongerRunningTimeout)
|
||||
return WaitTimeoutForPodNoLongerRunningInNamespace(c, podName, namespace, DefaultPodDeletionTimeout)
|
||||
}
|
||||
|
||||
func WaitTimeoutForPodNoLongerRunningInNamespace(c clientset.Interface, podName, namespace string, timeout time.Duration) error {
|
||||
@@ -2214,7 +2211,7 @@ func (f *Framework) MatchContainerOutput(
|
||||
createdPod := podClient.Create(pod)
|
||||
defer func() {
|
||||
By("delete the pod")
|
||||
podClient.DeleteSync(createdPod.Name, &metav1.DeleteOptions{}, podNoLongerRunningTimeout)
|
||||
podClient.DeleteSync(createdPod.Name, &metav1.DeleteOptions{}, DefaultPodDeletionTimeout)
|
||||
}()
|
||||
|
||||
// Wait for client pod to complete.
|
||||
|
||||
Reference in New Issue
Block a user