From 4b45db451e709ec7af0c4ad7880baf7262c7b5ed Mon Sep 17 00:00:00 2001 From: Hongchao Deng Date: Fri, 21 Apr 2017 10:24:17 -0700 Subject: [PATCH] e2e: work around k8s 1.6 grace period issue --- test/e2e/framework/framework.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index 51fc3b5..c8356c2 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -149,7 +149,9 @@ func (f *Framework) DeleteEtcdOperatorCompletely() error { if err != nil { return err } - err = retryutil.Retry(2*time.Second, 5, func() (bool, error) { + // On k8s 1.6.1, grace period isn't accurate. It took ~10s for operator pod to completely disappear. + // We work around by increasing the wait time. Revisit this later. + err = retryutil.Retry(5*time.Second, 6, func() (bool, error) { _, err := f.KubeClient.CoreV1().Pods(f.Namespace).Get("etcd-operator", metav1.GetOptions{}) if err == nil { return false, nil