From a713d24f82732beeb53dd4d501cb17335e08495b Mon Sep 17 00:00:00 2001 From: Manikandan R Date: Tue, 27 Aug 2024 11:33:47 +0530 Subject: [PATCH] Set correct queue name --- test/e2e/preemption/preemption_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/e2e/preemption/preemption_test.go b/test/e2e/preemption/preemption_test.go index 443c61137..28cd55bb3 100644 --- a/test/e2e/preemption/preemption_test.go +++ b/test/e2e/preemption/preemption_test.go @@ -164,7 +164,7 @@ var _ = ginkgo.Describe("Preemption", func() { }) // Define sleepPod - sleepPodConfigs := createSandbox1SleepPodCofigs(3, 600) + sleepPodConfigs := createSandbox1SleepPodCofigs(3, 600, "root.sandbox1") sleepPod4Config := k8s.SleepPodConfig{Name: "sleepjob4", NS: dev, Mem: sleepPodMemLimit, Time: 600, Optedout: k8s.Allow, Labels: map[string]string{"queue": "root.sandbox2"}} sleepPodConfigs = append(sleepPodConfigs, sleepPod4Config) @@ -226,7 +226,7 @@ var _ = ginkgo.Describe("Preemption", func() { }) // Define sleepPod - sandbox1SleepPodConfigs := createSandbox1SleepPodCofigs(3, 30) + sandbox1SleepPodConfigs := createSandbox1SleepPodCofigs(3, 30, "root.sandbox1") sleepPod4Config := k8s.SleepPodConfig{Name: "sleepjob4", NS: dev, Mem: sleepPodMemLimit, Time: 30, Optedout: k8s.Allow, Labels: map[string]string{"queue": "root.sandbox2"}} // Deploy pods in root.sandbox1 @@ -292,7 +292,7 @@ var _ = ginkgo.Describe("Preemption", func() { }) // Define sleepPod - sandbox1SleepPodConfigs := createSandbox1SleepPodCofigs(3, 30) + sandbox1SleepPodConfigs := createSandbox1SleepPodCofigs(3, 30, "root.sandbox1") sleepPod4Config := k8s.SleepPodConfig{Name: "sleepjob4", NS: dev, Mem: sleepPodMemLimit, Time: 30, Optedout: k8s.Allow, Labels: map[string]string{"queue": "root.sandbox2"}} // Deploy pods in root.sandbox1 @@ -371,7 +371,7 @@ var _ = ginkgo.Describe("Preemption", func() { }) // Define sleepPod - sandbox1SleepPodConfigs := createSandbox1SleepPodCofigs(3, 60) + sandbox1SleepPodConfigs := createSandbox1SleepPodCofigs(3, 60, "root.parent.sandbox1") sleepPod4Config := k8s.SleepPodConfig{Name: "sleepjob4", NS: dev, Mem: sleepPodMemLimit, Time: 600, Optedout: k8s.Allow, Labels: map[string]string{"queue": "root.parent.low-priority"}} sleepPod5Config := k8s.SleepPodConfig{Name: "sleepjob5", NS: dev, Mem: sleepPodMemLimit, Time: 600, Optedout: k8s.Allow, Labels: map[string]string{"queue": "root.parent.high-priority"}} @@ -572,10 +572,10 @@ var _ = ginkgo.Describe("Preemption", func() { }) }) -func createSandbox1SleepPodCofigs(cnt, time int) []k8s.SleepPodConfig { +func createSandbox1SleepPodCofigs(cnt, time int, queueName string) []k8s.SleepPodConfig { sandbox1Configs := make([]k8s.SleepPodConfig, 0, cnt) for i := 0; i < cnt; i++ { - sandbox1Configs = append(sandbox1Configs, k8s.SleepPodConfig{Name: fmt.Sprintf("sleepjob%d", i+1), NS: dev, Mem: sleepPodMemLimit, Time: time, Optedout: k8s.Allow, Labels: map[string]string{"queue": "root.parent.sandbox1"}}) + sandbox1Configs = append(sandbox1Configs, k8s.SleepPodConfig{Name: fmt.Sprintf("sleepjob%d", i+1), NS: dev, Mem: sleepPodMemLimit, Time: time, Optedout: k8s.Allow, Labels: map[string]string{"queue": queueName}}) } return sandbox1Configs }