From 42837ef1624c8024d3702b224c49d3ec296396d9 Mon Sep 17 00:00:00 2001 From: Jianbo Sun Date: Fri, 18 Feb 2022 15:06:28 +0800 Subject: [PATCH] Fix: make e2e CI more stable in vela show case (#3292) Signed-off-by: Jianbo Sun --- e2e/plugin/plugin_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/e2e/plugin/plugin_test.go b/e2e/plugin/plugin_test.go index 7f8c5d34e..1a9ff94ed 100644 --- a/e2e/plugin/plugin_test.go +++ b/e2e/plugin/plugin_test.go @@ -130,10 +130,11 @@ var _ = Describe("Test Kubectl Plugin", func() { Expect(output).Should(ContainSubstring(showTdResult)) }) It("Test show componentDefinition use Helm Charts as Workload", func() { - cdName := "test-webapp-chart" - output, err := e2e.Exec(fmt.Sprintf("kubectl-vela show %s -n default", cdName)) - Expect(err).NotTo(HaveOccurred()) - Expect(output).Should(ContainSubstring("Properties")) + Eventually(func() string { + cdName := "test-webapp-chart" + output, _ := e2e.Exec(fmt.Sprintf("kubectl-vela show %s -n default", cdName)) + return output + }, 20*time.Second).Should(ContainSubstring("Properties")) }) It("Test show componentDefinition def with raw Kube mode", func() { cdName := "kube-worker"