From b8b92a1116d207d353abbdf1f13aa6363976bab1 Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 30 Sep 2016 16:14:24 +0800 Subject: [PATCH] fix kubectl taint e2e flake: add retries for removing taint --- test/e2e/kubectl.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/e2e/kubectl.go b/test/e2e/kubectl.go index a35931f78b2..232c2014847 100644 --- a/test/e2e/kubectl.go +++ b/test/e2e/kubectl.go @@ -1293,7 +1293,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() { By("adding the taint " + testTaint.ToString() + " to a node") runKubectlRetryOrDie("taint", "nodes", nodeName, testTaint.ToString()) By("verifying the node has the taint " + testTaint.ToString()) - output := framework.RunKubectlOrDie("describe", "node", nodeName) + output := runKubectlRetryOrDie("describe", "node", nodeName) requiredStrings := [][]string{ {"Name:", nodeName}, {"Taints:"}, @@ -1304,7 +1304,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() { By("removing the taint " + testTaint.ToString() + " of a node") runKubectlRetryOrDie("taint", "nodes", nodeName, testTaint.Key+":"+string(testTaint.Effect)+"-") By("verifying the node doesn't have the taint " + testTaint.Key) - output = framework.RunKubectlOrDie("describe", "node", nodeName) + output = runKubectlRetryOrDie("describe", "node", nodeName) if strings.Contains(output, testTaint.Key) { framework.Failf("Failed removing taint " + testTaint.Key + " of the node " + nodeName) } @@ -1325,7 +1325,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() { By("adding the taint " + testTaint.ToString() + " to a node") runKubectlRetryOrDie("taint", "nodes", nodeName, testTaint.ToString()) By("verifying the node has the taint " + testTaint.ToString()) - output := framework.RunKubectlOrDie("describe", "node", nodeName) + output := runKubectlRetryOrDie("describe", "node", nodeName) requiredStrings := [][]string{ {"Name:", nodeName}, {"Taints:"}, @@ -1341,7 +1341,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() { By("adding another taint " + newTestTaint.ToString() + " to the node") runKubectlRetryOrDie("taint", "nodes", nodeName, newTestTaint.ToString()) By("verifying the node has the taint " + newTestTaint.ToString()) - output = framework.RunKubectlOrDie("describe", "node", nodeName) + output = runKubectlRetryOrDie("describe", "node", nodeName) requiredStrings = [][]string{ {"Name:", nodeName}, {"Taints:"}, @@ -1352,7 +1352,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() { By("removing all taints that have the same key " + testTaint.Key + " of the node") runKubectlRetryOrDie("taint", "nodes", nodeName, testTaint.Key+"-") By("verifying the node doesn't have the taints that have the same key " + testTaint.Key) - output = framework.RunKubectlOrDie("describe", "node", nodeName) + output = runKubectlRetryOrDie("describe", "node", nodeName) if strings.Contains(output, testTaint.Key) { framework.Failf("Failed removing taints " + testTaint.Key + " of the node " + nodeName) }