@@ -448,6 +448,26 @@ var _ = ginkgo.Describe("TrainJob controller", ginkgo.Ordered, func() {
448
448
g .Expect (k8sClient .Update (ctx , gotTrainJob )).Should (gomega .Succeed ())
449
449
}, util .Timeout , util .Interval ).Should (gomega .Succeed ())
450
450
451
+ ginkgo .By ("Waiting for TrainJob Created=True and Suspended=False condition" )
452
+ gomega .Eventually (func (g gomega.Gomega ) {
453
+ gotTrainJob := & trainer.TrainJob {}
454
+ g .Expect (k8sClient .Get (ctx , trainJobKey , gotTrainJob )).Should (gomega .Succeed ())
455
+ g .Expect (gotTrainJob .Status .Conditions ).Should (gomega .BeComparableTo ([]metav1.Condition {
456
+ {
457
+ Type : trainer .TrainJobSuspended ,
458
+ Status : metav1 .ConditionFalse ,
459
+ Reason : trainer .TrainJobResumedReason ,
460
+ Message : constants .TrainJobResumedMessage ,
461
+ },
462
+ {
463
+ Type : trainer .TrainJobCreated ,
464
+ Status : metav1 .ConditionTrue ,
465
+ Reason : trainer .TrainJobJobsCreationSucceededReason ,
466
+ Message : constants .TrainJobJobsCreationSucceededMessage ,
467
+ },
468
+ }, util .IgnoreConditions ))
469
+ }, util .Timeout , util .Interval ).Should (gomega .Succeed ())
470
+
451
471
ginkgo .By ("Updating the JobSet condition with Failed" )
452
472
gomega .Eventually (func (g gomega.Gomega ) {
453
473
jobSet := & jobsetv1alpha2.JobSet {}
0 commit comments