@@ -483,7 +483,7 @@ var _ = Describe("AppWrapper E2E Test", func() {
483
483
if pass {
484
484
break
485
485
} else {
486
- time .Sleep (1 * time .Minute )
486
+ time .Sleep (30 * time .Second )
487
487
}
488
488
}
489
489
@@ -581,13 +581,24 @@ var _ = Describe("AppWrapper E2E Test", func() {
581
581
aw := createGenericJobAWWithStatus (context , "aw-test-job-with-comp-1" )
582
582
err1 := waitAWPodsReady (context , aw )
583
583
Expect (err1 ).NotTo (HaveOccurred ())
584
- time .Sleep (1 * time .Minute )
585
584
aw1 , err := context .karclient .McadV1beta1 ().AppWrappers (aw .Namespace ).Get (context .ctx , aw .Name , metav1.GetOptions {})
586
585
if err != nil {
587
586
fmt .Fprintf (GinkgoWriter , "Error getting status, %v\n " , err )
588
587
}
589
588
Expect (err ).Should (Succeed ())
590
- Expect (aw1 .Status .State ).To (Equal (arbv1 .AppWrapperStateCompleted ))
589
+ var pass = false
590
+ for true {
591
+ aw1 , err := context .karclient .McadV1beta1 ().AppWrappers (aw .Namespace ).Get (context .ctx , aw .Name , metav1.GetOptions {})
592
+ if err != nil {
593
+ fmt .Fprintf (GinkgoWriter , "Error getting status, %v\n " , err )
594
+ }
595
+ if aw1 .Status .State == arbv1 .AppWrapperStateCompleted {
596
+ pass = true
597
+ break
598
+ }
599
+ }
600
+
601
+ Expect (pass ).To (Equal (true ))
591
602
fmt .Fprintf (GinkgoWriter , "[e2e] status of AW %v.\n " , aw1 .Status .State )
592
603
appwrappers = append (appwrappers , aw )
593
604
fmt .Fprintf (os .Stdout , "[e2e] MCAD Job Completion Test - Completed.\n " )
@@ -603,13 +614,25 @@ var _ = Describe("AppWrapper E2E Test", func() {
603
614
aw := createGenericJobAWWithMultipleStatus (context , "aw-test-job-with-comp-ms-21" )
604
615
err1 := waitAWPodsReady (context , aw )
605
616
Expect (err1 ).NotTo (HaveOccurred (), "Expecting pods to be ready for app wrapper: 'aw-test-job-with-comp-ms-21'" )
606
- time .Sleep (1 * time .Minute )
607
617
aw1 , err := context .karclient .McadV1beta1 ().AppWrappers (aw .Namespace ).Get (context .ctx , aw .Name , metav1.GetOptions {})
608
618
Expect (err ).NotTo (HaveOccurred (), "No error is expected when getting status" )
609
619
fmt .Fprintf (GinkgoWriter , "[e2e] MCAD Multi-Item Job Completion Test status of AW %v.\n " , aw1 .Status )
610
- Expect (aw1 .Status .State ).To (Equal (arbv1 .AppWrapperStateCompleted ), "Expecting a completed app wrapper status" )
620
+ var pass = false
621
+ for true {
622
+ aw1 , err := context .karclient .McadV1beta1 ().AppWrappers (aw .Namespace ).Get (context .ctx , aw .Name , metav1.GetOptions {})
623
+ if err != nil {
624
+ fmt .Fprintf (GinkgoWriter , "Error getting status, %v\n " , err )
625
+ }
626
+ if aw1 .Status .State == arbv1 .AppWrapperStateCompleted {
627
+ pass = true
628
+ break
629
+ }
630
+ }
631
+
632
+ Expect (pass ).To (Equal (true ))
633
+ fmt .Fprintf (GinkgoWriter , "[e2e] status of AW %v.\n " , aw1 .Status .State )
611
634
appwrappers = append (appwrappers , aw )
612
- fmt .Fprintf (os .Stdout , "[e2e] MCAD Job Completion Test - Completed.\n " )
635
+ fmt .Fprintf (os .Stdout , "[e2e] MCAD Multi-Item Job Completion Test - Completed.\n " )
613
636
})
614
637
615
638
It ("MCAD GenericItem Without Status Test" , func () {
@@ -661,7 +684,6 @@ var _ = Describe("AppWrapper E2E Test", func() {
661
684
aw := createGenericJobAWtWithLargeCompute (context , "aw-test-job-with-large-comp-1" )
662
685
err1 := waitAWPodsReady (context , aw )
663
686
Expect (err1 ).NotTo (HaveOccurred ())
664
- time .Sleep (1 * time .Minute )
665
687
aw1 , err := context .karclient .McadV1beta1 ().AppWrappers (aw .Namespace ).Get (context .ctx , aw .Name , metav1.GetOptions {})
666
688
if err != nil {
667
689
fmt .Fprintf (GinkgoWriter , "Error getting status, %v" , err )
@@ -708,7 +730,7 @@ var _ = Describe("AppWrapper E2E Test", func() {
708
730
709
731
aw := createGenericDeploymentAWWithMultipleItems (context , "aw-deployment-rhc" )
710
732
appwrappers = append (appwrappers , aw )
711
- time .Sleep (30 * time .Second )
733
+ // time.Sleep(30 * time.Second)
712
734
err1 := waitAWPodsReady (context , aw )
713
735
Expect (err1 ).NotTo (HaveOccurred (), "Expecting pods to be ready for app wrapper: aw-deployment-rhc" )
714
736
aw1 , err := context .karclient .McadV1beta1 ().AppWrappers (aw .Namespace ).Get (context .ctx , aw .Name , metav1.GetOptions {})
@@ -738,7 +760,7 @@ var _ = Describe("AppWrapper E2E Test", func() {
738
760
defer cleanupTestObjectsPtr (context , appwrappersPtr )
739
761
740
762
aw := createGenericServiceAWWithNoStatus (context , appendRandomString ("aw-deployment-2-status" ))
741
- time .Sleep (1 * time .Minute )
763
+ //ßtime .Sleep(1 * time.Minute)
742
764
err1 := waitAWPodsReady (context , aw )
743
765
Expect (err1 ).NotTo (HaveOccurred ())
744
766
aw1 , err := context .karclient .McadV1beta1 ().AppWrappers (aw .Namespace ).Get (context .ctx , aw .Name , metav1.GetOptions {})
0 commit comments