mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-19 04:26:39 +00:00
Feat: fix flacky test (#5742)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
(cherry picked from commit ca4636030e)
Co-authored-by: Somefive <yd219913@alibaba-inc.com>
This commit is contained in:
co-authored by
Somefive
parent
ae6697b316
commit
17a76cc0e2
@@ -711,7 +711,9 @@ var _ = Describe("Test multicluster scenario", func() {
|
||||
app := &v1beta1.Application{}
|
||||
Expect(yaml.Unmarshal(bs, app)).Should(Succeed())
|
||||
app.SetNamespace(testNamespace)
|
||||
Expect(k8sClient.Create(hubCtx, app)).Should(Succeed())
|
||||
Eventually(func(g Gomega) { // informer may have latency for the added definition
|
||||
g.Expect(k8sClient.Create(hubCtx, app)).Should(Succeed())
|
||||
}).WithTimeout(10 * time.Second).WithPolling(2 * time.Second).Should(Succeed())
|
||||
key := client.ObjectKeyFromObject(app)
|
||||
Eventually(func(g Gomega) {
|
||||
g.Expect(k8sClient.Get(hubCtx, key, app)).Should(Succeed())
|
||||
|
||||
Reference in New Issue
Block a user