Skip to content

Commit f63f235

Browse files
committed
add polling logic
1 parent f90b8ae commit f63f235

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

test/e2e/queue.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,8 +713,22 @@ var _ = Describe("AppWrapper E2E Test", func() {
713713
Expect(err1).NotTo(HaveOccurred(), "Expecting pods to be ready for app wrapper: aw-deployment-rhc")
714714
aw1, err := context.karclient.McadV1beta1().AppWrappers(aw.Namespace).Get(context.ctx, aw.Name, metav1.GetOptions{})
715715
Expect(err).NotTo(HaveOccurred(), "Expecting to get app wrapper status")
716+
pass := false
717+
for true {
718+
aw1, err := context.karclient.McadV1beta1().AppWrappers(aw.Namespace).Get(context.ctx, aw.Name, metav1.GetOptions{})
719+
if err != nil {
720+
fmt.Fprint(GinkgoWriter, "Error getting status")
721+
}
722+
fmt.Fprintf(GinkgoWriter, "[e2e] status of AW %v.\n", aw1.Status.State)
723+
if aw1.Status.State == arbv1.AppWrapperStateRunningHoldCompletion {
724+
pass = true
725+
}
726+
if pass {
727+
break
728+
}
729+
}
716730
fmt.Fprintf(GinkgoWriter, "[e2e] status of AW %v.\n", aw1.Status.State)
717-
Expect(aw1.Status.State).To(Equal(arbv1.AppWrapperStateRunningHoldCompletion))
731+
Expect(pass).To(BeTrue())
718732
fmt.Fprintf(os.Stdout, "[e2e] MCAD Deployment RuningHoldCompletion Test - Completed. Awaiting app wrapper cleanup.\n")
719733
})
720734

0 commit comments

Comments
 (0)