Skip to content

speed up build #589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 22, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 52 additions & 15 deletions test/e2e/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ var _ = Describe("AppWrapper E2E Test", func() {
if pass {
break
} else {
time.Sleep(1 * time.Minute)
time.Sleep(30 * time.Second)
}
}

Expand Down Expand Up @@ -581,13 +581,24 @@ var _ = Describe("AppWrapper E2E Test", func() {
aw := createGenericJobAWWithStatus(context, "aw-test-job-with-comp-1")
err1 := waitAWPodsReady(context, aw)
Expect(err1).NotTo(HaveOccurred())
time.Sleep(1 * time.Minute)
aw1, err := context.karclient.McadV1beta1().AppWrappers(aw.Namespace).Get(context.ctx, aw.Name, metav1.GetOptions{})
if err != nil {
fmt.Fprintf(GinkgoWriter, "Error getting status, %v\n", err)
}
Expect(err).Should(Succeed())
Expect(aw1.Status.State).To(Equal(arbv1.AppWrapperStateCompleted))
var pass = false
for true {
aw1, err := context.karclient.McadV1beta1().AppWrappers(aw.Namespace).Get(context.ctx, aw.Name, metav1.GetOptions{})
if err != nil {
fmt.Fprintf(GinkgoWriter, "Error getting status, %v\n", err)
}
if aw1.Status.State == arbv1.AppWrapperStateCompleted {
pass = true
break
}
}

Expect(pass).To(Equal(true))
fmt.Fprintf(GinkgoWriter, "[e2e] status of AW %v.\n", aw1.Status.State)
appwrappers = append(appwrappers, aw)
fmt.Fprintf(os.Stdout, "[e2e] MCAD Job Completion Test - Completed.\n")
Expand All @@ -603,13 +614,25 @@ var _ = Describe("AppWrapper E2E Test", func() {
aw := createGenericJobAWWithMultipleStatus(context, "aw-test-job-with-comp-ms-21")
err1 := waitAWPodsReady(context, aw)
Expect(err1).NotTo(HaveOccurred(), "Expecting pods to be ready for app wrapper: 'aw-test-job-with-comp-ms-21'")
time.Sleep(1 * time.Minute)
aw1, err := context.karclient.McadV1beta1().AppWrappers(aw.Namespace).Get(context.ctx, aw.Name, metav1.GetOptions{})
Expect(err).NotTo(HaveOccurred(), "No error is expected when getting status")
fmt.Fprintf(GinkgoWriter, "[e2e] MCAD Multi-Item Job Completion Test status of AW %v.\n", aw1.Status)
Expect(aw1.Status.State).To(Equal(arbv1.AppWrapperStateCompleted), "Expecting a completed app wrapper status")
var pass = false
for true {
aw1, err := context.karclient.McadV1beta1().AppWrappers(aw.Namespace).Get(context.ctx, aw.Name, metav1.GetOptions{})
if err != nil {
fmt.Fprintf(GinkgoWriter, "Error getting status, %v\n", err)
}
if aw1.Status.State == arbv1.AppWrapperStateCompleted {
pass = true
break
}
}

Expect(pass).To(Equal(true))
fmt.Fprintf(GinkgoWriter, "[e2e] status of AW %v.\n", aw1.Status.State)
appwrappers = append(appwrappers, aw)
fmt.Fprintf(os.Stdout, "[e2e] MCAD Job Completion Test - Completed.\n")
fmt.Fprintf(os.Stdout, "[e2e] MCAD Multi-Item Job Completion Test - Completed.\n")
})

It("MCAD GenericItem Without Status Test", func() {
Expand Down Expand Up @@ -661,16 +684,23 @@ var _ = Describe("AppWrapper E2E Test", func() {
aw := createGenericJobAWtWithLargeCompute(context, "aw-test-job-with-large-comp-1")
err1 := waitAWPodsReady(context, aw)
Expect(err1).NotTo(HaveOccurred())
time.Sleep(1 * time.Minute)
aw1, err := context.karclient.McadV1beta1().AppWrappers(aw.Namespace).Get(context.ctx, aw.Name, metav1.GetOptions{})
if err != nil {
fmt.Fprintf(GinkgoWriter, "Error getting status, %v", err)
}
pass := false
fmt.Fprintf(GinkgoWriter, "[e2e] status of AW %v.\n", aw1.Status.State)
if aw1.Status.State == arbv1.AppWrapperStateEnqueued {
pass = true
for true {
aw1, err := context.karclient.McadV1beta1().AppWrappers(aw.Namespace).Get(context.ctx, aw.Name, metav1.GetOptions{})
if err != nil {
fmt.Fprint(GinkgoWriter, "Error getting status")
}
if aw1.Status.State == arbv1.AppWrapperStateEnqueued {
pass = true
break
}
}

fmt.Fprintf(GinkgoWriter, "[e2e] status of AW %v.\n", aw1.Status.State)
Expect(pass).To(BeTrue())
appwrappers = append(appwrappers, aw)
fmt.Fprintf(os.Stdout, "[e2e] MCAD Job Large Compute Requirement Test - Completed.\n")
Expand Down Expand Up @@ -708,7 +738,7 @@ var _ = Describe("AppWrapper E2E Test", func() {

aw := createGenericDeploymentAWWithMultipleItems(context, "aw-deployment-rhc")
appwrappers = append(appwrappers, aw)
time.Sleep(30 * time.Second)
//time.Sleep(30 * time.Second)
err1 := waitAWPodsReady(context, aw)
Expect(err1).NotTo(HaveOccurred(), "Expecting pods to be ready for app wrapper: aw-deployment-rhc")
aw1, err := context.karclient.McadV1beta1().AppWrappers(aw.Namespace).Get(context.ctx, aw.Name, metav1.GetOptions{})
Expand Down Expand Up @@ -738,18 +768,25 @@ var _ = Describe("AppWrapper E2E Test", func() {
defer cleanupTestObjectsPtr(context, appwrappersPtr)

aw := createGenericServiceAWWithNoStatus(context, appendRandomString("aw-deployment-2-status"))
time.Sleep(1 * time.Minute)
//ßtime.Sleep(1 * time.Minute)
err1 := waitAWPodsReady(context, aw)
Expect(err1).NotTo(HaveOccurred())
aw1, err := context.karclient.McadV1beta1().AppWrappers(aw.Namespace).Get(context.ctx, aw.Name, metav1.GetOptions{})
if err != nil {
fmt.Fprintf(GinkgoWriter, "Error getting status, %v", err)
}
pass := false
fmt.Fprintf(GinkgoWriter, "[e2e] status of AW %v.\n", aw1.Status.State)
if aw1.Status.State == arbv1.AppWrapperStateActive {
pass = true
for true {
aw1, err := context.karclient.McadV1beta1().AppWrappers(aw.Namespace).Get(context.ctx, aw.Name, metav1.GetOptions{})
if err != nil {
fmt.Fprintf(GinkgoWriter, "Error getting status, %v", err)
}
if aw1.Status.State == arbv1.AppWrapperStateActive {
pass = true
break
}
}
fmt.Fprintf(GinkgoWriter, "[e2e] status of AW %v.\n", aw1.Status.State)
Expect(pass).To(BeTrue())
appwrappers = append(appwrappers, aw)
fmt.Fprintf(os.Stdout, "[e2e] MCAD Service no RuningHoldCompletion or Complete Test - Completed.\n")
Expand Down