Skip to content

Commit 8eeaaf8

Browse files
committed
fix test 2
1 parent ff376f5 commit 8eeaaf8

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

test/e2e/queue.go

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ var _ = Describe("AppWrapper E2E Test", func() {
129129
})
130130

131131
It("MCAD CPU Requeuing - Completion After Enough Requeuing Times Test", func() {
132-
132+
133133
Skip("Skipping MCAD CPU Requeuing - Completion After Enough Requeuing Times Test - [Bug] Failing intermittently on opened PRs")
134134

135135
fmt.Fprintf(os.Stdout, "[e2e] Completion After Enough Requeuing Times Test - Started.\n")
@@ -152,7 +152,7 @@ var _ = Describe("AppWrapper E2E Test", func() {
152152
})
153153

154154
It("MCAD CPU Requeuing - Deletion After Maximum Requeuing Times Test", func() {
155-
155+
156156
Skip("Skipping MCAD CPU Requeuing - Deletion After Maximum Requeuing Times Test - [Bug] Failing intermittently on opened PRs")
157157

158158
fmt.Fprintf(os.Stdout, "[e2e] MCAD CPU Requeuing - Deletion After Maximum Requeuing Times Test - Started.\n")
@@ -435,7 +435,6 @@ var _ = Describe("AppWrapper E2E Test", func() {
435435
context, appendRandomString("aw-ff-deployment-55-percent-cpu"), resource, resource, 2, 60)
436436
appwrappers = append(appwrappers, aw)
437437
err := waitAWPodsReady(context, aw)
438-
fmt.Fprintf(os.Stdout, "The aw status is %v", aw.Status.State)
439438
Expect(err).NotTo(HaveOccurred(), "Expecting pods for app wrapper: aw-ff-deployment-1-3500-cpu")
440439

441440
// This should not fit on any node but should dispatch because there is enough aggregated resources.
@@ -502,15 +501,21 @@ var _ = Describe("AppWrapper E2E Test", func() {
502501
defer cleanupTestObjectsPtr(context, appwrappersPtr)
503502

504503
// This should fill up the worker node and most of the master node
505-
aw := createDeploymentAWwith550CPU(context, appendRandomString("aw-deployment-2-550cpu"))
504+
cap := getClusterCapacitycontext(context)
505+
resource := cpuDemand(cap, 0.275).String()
506+
aw := createGenericDeploymentCustomPodResourcesWithCPUAW(
507+
context, appendRandomString("aw-ff-deployment-55-percent-cpu"), resource, resource, 2, 60)
506508
appwrappers = append(appwrappers, aw)
507509

508510
err := waitAWPodsReady(context, aw)
509511
Expect(err).NotTo(HaveOccurred(), "Expecting pods to be ready for app wrapper: aw-deployment-2-550cpu")
510512

511513
// This should not fit on cluster but customPodResources is incorrect so AW pods are created
514+
// aw2 := createGenericDeploymentCustomPodResourcesWithCPUAW(
515+
// context, appendRandomString("aw-deployment-2-425-vs-426-cpu"), "425m", "426m", 2, 60)
516+
resource2 := cpuDemand(cap, 0.5).String()
512517
aw2 := createGenericDeploymentCustomPodResourcesWithCPUAW(
513-
context, appendRandomString("aw-deployment-2-425-vs-426-cpu"), "425m", "426m", 2, 60)
518+
context, appendRandomString("aw-ff-deployment-40-percent-cpu"), "425m", resource2, 1, 60)
514519

515520
appwrappers = append(appwrappers, aw2)
516521

@@ -522,6 +527,7 @@ var _ = Describe("AppWrapper E2E Test", func() {
522527
})
523528

524529
It("MCAD Bad Custom Pod Resources vs. Deployment Pod Resource Queuing Test 2", func() {
530+
Skip("MCAD Bad Custom Pod Resources vs. Deployment Pod Resource Queuing Test 2 - Deployment controller removed and this test case does not apply")
525531
fmt.Fprintf(os.Stdout, "[e2e] MCAD Bad Custom Pod Resources vs. Deployment Pod Resource Queuing Test 2 - Started.\n")
526532
context := initTestContext()
527533
var appwrappers []*arbv1.AppWrapper
@@ -665,18 +671,25 @@ var _ = Describe("AppWrapper E2E Test", func() {
665671
defer cleanupTestObjectsPtr(context, appwrappersPtr)
666672

667673
// This should fill up the worker node and most of the master node
668-
aw := createDeploymentAWwith550CPU(context, appendRandomString("aw-deployment-2-550cpu"))
674+
//aw := createDeploymentAWwith550CPU(context, appendRandomString("aw-deployment-2-550cpu"))
675+
cap := getClusterCapacitycontext(context)
676+
resource := cpuDemand(cap, 0.275).String()
677+
aw := createGenericDeploymentCustomPodResourcesWithCPUAW(
678+
context, appendRandomString("aw-ff-deployment-55-percent-cpu"), resource, resource, 2, 60)
669679
appwrappers = append(appwrappers, aw)
670680
err := waitAWPodsReady(context, aw)
671-
Expect(err).NotTo(HaveOccurred(), "Waiting for pods to be ready for app wrapper: aw-deployment-2-550cpu")
681+
Expect(err).NotTo(HaveOccurred(), "Waiting for pods to be ready for app wrapper: aw-ff-deployment-55-percent-cpu")
672682

673683
// This should not fit on cluster
674684
// there may be a false positive dispatch which will cause MCAD to requeue AW
675-
aw2 := createDeploymentAWwith426CPU(context, appendRandomString("aw-deployment-2-426cpu"))
685+
//aw2 := createDeploymentAWwith426CPU(context, appendRandomString("aw-deployment-2-426cpu"))
686+
resource2 := cpuDemand(cap, 0.5).String()
687+
aw2 := createGenericDeploymentCustomPodResourcesWithCPUAW(
688+
context, appendRandomString("aw-ff-deployment-40-percent-cpu"), resource2, resource2, 1, 60)
676689
appwrappers = append(appwrappers, aw2)
677690

678691
err = waitAWPodsReady(context, aw2)
679-
Expect(err).To(HaveOccurred(), "No pods for app wrapper `aw-deployment-2-426cpu` are expected.")
692+
Expect(err).To(HaveOccurred(), "No pods for app wrapper `aw-ff-deployment-40-percent-cpu` are expected.")
680693
})
681694

682695
It("MCAD Deployment RunningHoldCompletion Test", func() {

0 commit comments

Comments
 (0)