Skip to content

Commit

Permalink
fix sporadic test failure in core_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohit-0505 committed Oct 3, 2024
1 parent 3570ee8 commit 1991357
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions internal/app/core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ var _ = Describe("Core", func() {
}
Expect(k8sClient.Create(ctx, machine)).To(Succeed())

By("getting the resource quota")
By("waiting for the resource quota to be updated")
resourceQuotaKey := client.ObjectKeyFromObject(resourceQuota)
Expect(k8sClient.Get(ctx, resourceQuotaKey, resourceQuota)).To(Succeed())

By("inspecting the resource quota")
Expect(resourceQuota.Status.Used).To(Equal(corev1alpha1.ResourceList{
corev1alpha1.ResourceRequestsCPU: resource.MustParse("1"),
}))
Eventually(func(g Gomega) {
Expect(k8sClient.Get(ctx, resourceQuotaKey, resourceQuota)).To(Succeed())
g.Expect(resourceQuota.Status.Used).To(Equal(corev1alpha1.ResourceList{
corev1alpha1.ResourceRequestsCPU: resource.MustParse("1"),
}))
}).Should(Succeed())
})
})
})

0 comments on commit 1991357

Please sign in to comment.