Skip to content

Commit

Permalink
ControlPlane: Fix flaky integraion testings due to missing the latest…
Browse files Browse the repository at this point in the history
… version of object (#2414)

Signed-off-by: Yuki Iwai <[email protected]>
  • Loading branch information
tenzen-y authored Feb 5, 2025
1 parent 7858371 commit 562cf97
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/integration/controller.v2/trainjob_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,10 @@ var _ = ginkgo.Describe("TrainJob marker validations and defaulting", ginkgo.Ord
ginkgo.DescribeTable("Validate TrainJob on update", func(old func() *kubeflowv2.TrainJob, new func(*kubeflowv2.TrainJob) *kubeflowv2.TrainJob, errorMatcher gomega.OmegaMatcher) {
oldTrainJob := old()
gomega.Expect(k8sClient.Create(ctx, oldTrainJob)).Should(gomega.Succeed())
gomega.Expect(k8sClient.Update(ctx, new(oldTrainJob))).Should(errorMatcher)
gomega.Eventually(func(g gomega.Gomega) {
g.Expect(k8sClient.Get(ctx, client.ObjectKeyFromObject(oldTrainJob), oldTrainJob)).Should(gomega.Succeed())
g.Expect(k8sClient.Update(ctx, new(oldTrainJob))).Should(errorMatcher)
}, util.Timeout, util.Interval).Should(gomega.Succeed())
},
ginkgo.Entry("Should fail to update TrainJob managedBy",
func() *kubeflowv2.TrainJob {
Expand Down

0 comments on commit 562cf97

Please sign in to comment.