提交 5ac8aef3 编写于 作者: T Thomas Stromberg

Retry Pods.List, as it may fails when the apiserver is being rescheduled

上级 279915a3
......@@ -227,9 +227,8 @@ func PodWait(ctx context.Context, t *testing.T, profile string, ns string, selec
f := func() (bool, error) {
pods, err := client.CoreV1().Pods(ns).List(listOpts)
if err != nil {
t.Logf("Pod(%s).List(%v) returned error: %v", ns, selector, err)
// Don't bother to retry: something is very wrong.
return true, err
t.Logf("WARNING: Pod(%s).List(%v) returned error: %v", ns, selector, err)
return false, err
}
if len(pods.Items) == 0 {
podStart = time.Time{}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册