Skip to content

Commit 47448c8

Browse files
authored
Merge pull request #3566 from sbueringer/pr-fix-unit-test-flake
🐛 Fix flake in reconciliation tests
2 parents 5fe133c + 08e6ce6 commit 47448c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

controllers/vmware/test/controllers_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,9 @@ var _ = Describe("Reconciliation tests", func() {
661661

662662
By("Expect the VM to have been successfully created")
663663
newVM := &vmoprv1.VirtualMachine{}
664-
Expect(k8sClient.Get(ctx, machineKey, newVM)).Should(Succeed())
664+
Eventually(func(g Gomega) {
665+
g.Expect(k8sClient.Get(ctx, machineKey, newVM)).Should(Succeed())
666+
}, time.Second*10).Should(Succeed())
665667

666668
By("Modifying the VM to simulate it having been created")
667669
Eventually(func() error {

0 commit comments

Comments
 (0)