@@ -483,7 +483,7 @@ var _ = Describe("AppWrapper E2E Test", func() {
483483 if pass {
484484 break
485485 } else {
486- time .Sleep (1 * time .Minute )
486+ time .Sleep (30 * time .Second )
487487 }
488488 }
489489
@@ -581,13 +581,24 @@ var _ = Describe("AppWrapper E2E Test", func() {
581581 aw := createGenericJobAWWithStatus (context , "aw-test-job-with-comp-1" )
582582 err1 := waitAWPodsReady (context , aw )
583583 Expect (err1 ).NotTo (HaveOccurred ())
584- time .Sleep (1 * time .Minute )
585584 aw1 , err := context .karclient .McadV1beta1 ().AppWrappers (aw .Namespace ).Get (context .ctx , aw .Name , metav1.GetOptions {})
586585 if err != nil {
587586 fmt .Fprintf (GinkgoWriter , "Error getting status, %v\n " , err )
588587 }
589588 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 ))
591602 fmt .Fprintf (GinkgoWriter , "[e2e] status of AW %v.\n " , aw1 .Status .State )
592603 appwrappers = append (appwrappers , aw )
593604 fmt .Fprintf (os .Stdout , "[e2e] MCAD Job Completion Test - Completed.\n " )
@@ -603,13 +614,25 @@ var _ = Describe("AppWrapper E2E Test", func() {
603614 aw := createGenericJobAWWithMultipleStatus (context , "aw-test-job-with-comp-ms-21" )
604615 err1 := waitAWPodsReady (context , aw )
605616 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 )
607617 aw1 , err := context .karclient .McadV1beta1 ().AppWrappers (aw .Namespace ).Get (context .ctx , aw .Name , metav1.GetOptions {})
608618 Expect (err ).NotTo (HaveOccurred (), "No error is expected when getting status" )
609619 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 )
611634 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 " )
613636 })
614637
615638 It ("MCAD GenericItem Without Status Test" , func () {
@@ -661,7 +684,6 @@ var _ = Describe("AppWrapper E2E Test", func() {
661684 aw := createGenericJobAWtWithLargeCompute (context , "aw-test-job-with-large-comp-1" )
662685 err1 := waitAWPodsReady (context , aw )
663686 Expect (err1 ).NotTo (HaveOccurred ())
664- time .Sleep (1 * time .Minute )
665687 aw1 , err := context .karclient .McadV1beta1 ().AppWrappers (aw .Namespace ).Get (context .ctx , aw .Name , metav1.GetOptions {})
666688 if err != nil {
667689 fmt .Fprintf (GinkgoWriter , "Error getting status, %v" , err )
@@ -708,7 +730,7 @@ var _ = Describe("AppWrapper E2E Test", func() {
708730
709731 aw := createGenericDeploymentAWWithMultipleItems (context , "aw-deployment-rhc" )
710732 appwrappers = append (appwrappers , aw )
711- time .Sleep (30 * time .Second )
733+ // time.Sleep(30 * time.Second)
712734 err1 := waitAWPodsReady (context , aw )
713735 Expect (err1 ).NotTo (HaveOccurred (), "Expecting pods to be ready for app wrapper: aw-deployment-rhc" )
714736 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() {
738760 defer cleanupTestObjectsPtr (context , appwrappersPtr )
739761
740762 aw := createGenericServiceAWWithNoStatus (context , appendRandomString ("aw-deployment-2-status" ))
741- time .Sleep (1 * time .Minute )
763+ //ßtime .Sleep(1 * time.Minute)
742764 err1 := waitAWPodsReady (context , aw )
743765 Expect (err1 ).NotTo (HaveOccurred ())
744766 aw1 , err := context .karclient .McadV1beta1 ().AppWrappers (aw .Namespace ).Get (context .ctx , aw .Name , metav1.GetOptions {})
0 commit comments