mirror of
https://github.com/hanzo-ml/trainer.git
synced 2026-09-24 00:31:34 +00:00
chore: deflake test to ensure runtime is created before creating trainjob (#2807)
Signed-off-by: Tsubasa Nagasawa <[email protected]>
This commit is contained in:
@@ -107,6 +107,9 @@ var _ = ginkgo.Describe("ClusterTrainingRuntime controller", ginkgo.Ordered, fun
|
||||
ginkgo.It("ClusterTrainingRuntime can be deleted once referenced TrainJob is deleted", func() {
|
||||
ginkgo.By("Creating a ClusterTrainingRuntime and TrainJob")
|
||||
gomega.Expect(k8sClient.Create(ctx, clTrainingRuntime)).Should(gomega.Succeed())
|
||||
gomega.Eventually(func(g gomega.Gomega) {
|
||||
g.Expect(k8sClient.Get(ctx, client.ObjectKeyFromObject(clTrainingRuntime), clTrainingRuntime)).Should(gomega.Succeed())
|
||||
}, util.Timeout, util.Interval).Should(gomega.Succeed())
|
||||
gomega.Expect(k8sClient.Create(ctx, trainJob)).Should(gomega.Succeed())
|
||||
|
||||
ginkgo.By("Checking if the ClusterTrainingRuntime obtains finalizers")
|
||||
|
||||
@@ -99,6 +99,9 @@ var _ = ginkgo.Describe("TrainingRuntime controller", ginkgo.Ordered, func() {
|
||||
ginkgo.It("TrainingRuntime can be deleted once referenced TrainJob is deleted", func() {
|
||||
ginkgo.By("Creating a TrainingRuntime and TrainJob")
|
||||
gomega.Expect(k8sClient.Create(ctx, trainingRuntime)).Should(gomega.Succeed())
|
||||
gomega.Eventually(func(g gomega.Gomega) {
|
||||
g.Expect(k8sClient.Get(ctx, client.ObjectKeyFromObject(trainingRuntime), trainingRuntime)).Should(gomega.Succeed())
|
||||
}, util.Timeout, util.Interval).Should(gomega.Succeed())
|
||||
gomega.Expect(k8sClient.Create(ctx, trainJob)).Should(gomega.Succeed())
|
||||
|
||||
ginkgo.By("Checking if the TrainingRuntime obtains finalizers")
|
||||
|
||||
Reference in New Issue
Block a user