Skip to content

Commit a6ddbdd

Browse files
asm582openshift-merge-robot
authored andcommitted
fix tests
1 parent 23b1f35 commit a6ddbdd

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

test/e2e/queue.go

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -689,10 +689,18 @@ var _ = Describe("AppWrapper E2E Test", func() {
689689
fmt.Fprintf(GinkgoWriter, "Error getting status, %v", err)
690690
}
691691
pass := false
692-
fmt.Fprintf(GinkgoWriter, "[e2e] status of AW %v.\n", aw1.Status.State)
693-
if aw1.Status.State == arbv1.AppWrapperStateEnqueued {
694-
pass = true
692+
for true {
693+
aw1, err := context.karclient.McadV1beta1().AppWrappers(aw.Namespace).Get(context.ctx, aw.Name, metav1.GetOptions{})
694+
if err != nil {
695+
fmt.Fprint(GinkgoWriter, "Error getting status")
696+
}
697+
if aw1.Status.State == arbv1.AppWrapperStateEnqueued {
698+
pass = true
699+
break
700+
}
695701
}
702+
703+
fmt.Fprintf(GinkgoWriter, "[e2e] status of AW %v.\n", aw1.Status.State)
696704
Expect(pass).To(BeTrue())
697705
appwrappers = append(appwrappers, aw)
698706
fmt.Fprintf(os.Stdout, "[e2e] MCAD Job Large Compute Requirement Test - Completed.\n")
@@ -768,10 +776,17 @@ var _ = Describe("AppWrapper E2E Test", func() {
768776
fmt.Fprintf(GinkgoWriter, "Error getting status, %v", err)
769777
}
770778
pass := false
771-
fmt.Fprintf(GinkgoWriter, "[e2e] status of AW %v.\n", aw1.Status.State)
772-
if aw1.Status.State == arbv1.AppWrapperStateActive {
773-
pass = true
779+
for true {
780+
aw1, err := context.karclient.McadV1beta1().AppWrappers(aw.Namespace).Get(context.ctx, aw.Name, metav1.GetOptions{})
781+
if err != nil {
782+
fmt.Fprintf(GinkgoWriter, "Error getting status, %v", err)
783+
}
784+
if aw1.Status.State == arbv1.AppWrapperStateActive {
785+
pass = true
786+
break
787+
}
774788
}
789+
fmt.Fprintf(GinkgoWriter, "[e2e] status of AW %v.\n", aw1.Status.State)
775790
Expect(pass).To(BeTrue())
776791
appwrappers = append(appwrappers, aw)
777792
fmt.Fprintf(os.Stdout, "[e2e] MCAD Service no RuningHoldCompletion or Complete Test - Completed.\n")

0 commit comments

Comments
 (0)