From 7f243f93c379c1cd46ad086a56531cec63f0cdfc Mon Sep 17 00:00:00 2001 From: "tao.yang" Date: Mon, 18 Dec 2023 18:24:13 +0800 Subject: [PATCH] Modify timeout Signed-off-by: tao.yang --- framework/pod.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/framework/pod.go b/framework/pod.go index a883ce64..574b213a 100644 --- a/framework/pod.go +++ b/framework/pod.go @@ -98,7 +98,7 @@ func (f *Framework) WaitPodStarted(name, namespace string, ctx context.Context) select { case <-ctx.Done(): f.Log("pod %s/%s is still in phase %s \n", namespace, name, pod.Status.Phase) - podEvents, err := f.GetEvents(ctx, "Pod", name, namespace) + podEvents, err := f.GetEvents(context.Background(), "Pod", name, namespace) if nil == err { for _, item := range podEvents.Items { f.Log("pod %s/%s events: %s\n", namespace, name, item.String()) @@ -111,7 +111,7 @@ func (f *Framework) WaitPodStarted(name, namespace string, ctx context.Context) pod, err := f.GetPod(name, namespace) if nil != err { if errors.IsNotFound(err) { - time.Sleep(time.Second) + time.Sleep(3 * time.Second) continue } return nil, err @@ -119,7 +119,7 @@ func (f *Framework) WaitPodStarted(name, namespace string, ctx context.Context) if pod.Status.Phase == corev1.PodRunning { return pod, nil } - time.Sleep(time.Second) + time.Sleep(3 * time.Second) } } } @@ -147,7 +147,7 @@ func (f *Framework) WaitPodListDeleted(namespace string, label map[string]string } else if len(podlist.Items) == 0 { return nil } - time.Sleep(time.Second) + time.Sleep(3 * time.Second) } } }