From c7c76efb371caa5fea041db9755493177a8c1abf Mon Sep 17 00:00:00 2001 From: lyyyuna Date: Wed, 8 Sep 2021 11:26:18 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA=20test:=20=E4=BF=AE=E5=A4=8D=20mac?= =?UTF-8?q?os=20=E4=B8=8A=20agent=20=E6=B3=A8=E5=86=8C=E5=81=8F=E6=85=A2?= =?UTF-8?q?=E7=9A=84=20test=20case?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/e2e/e2e_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index 58f0034..09b2414 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -65,9 +65,11 @@ var _ = Describe("1 [基础测试]", func() { defer basicC.Stop() By("使用 goc service get 获取服务列表") - output, err = RunShortRunCmd([]string{"goc", "service", "get"}, dir, nil) - Expect(err).To(BeNil(), "goc servive get 运行错误") - Expect(output).To(ContainSubstring("127.0.0.1 ./basic2"), "goc service get 输出应该包含 basic 服务") + Eventually(func() { + output, err = RunShortRunCmd([]string{"goc", "service", "get"}, dir, nil) + Expect(err).To(BeNil(), "goc servive get 运行错误") + Expect(output).To(ContainSubstring("127.0.0.1 ./basic2"), "goc service get 输出应该包含 basic 服务") + }, 3*time.Second, 1*time.Second).Should(Succeed()) By("使用 goc profile get 获取覆盖率") profileStr := `mode: count