From 83fa93a8643f1f5b818abc9b284c27a4af394cc0 Mon Sep 17 00:00:00 2001 From: Sargun Narula Date: Fri, 16 Aug 2024 16:57:19 +0530 Subject: [PATCH] Improved pod name --- .../functests/1_performance/cpu_management.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/e2e/performanceprofile/functests/1_performance/cpu_management.go b/test/e2e/performanceprofile/functests/1_performance/cpu_management.go index f3da5ea3f6..74497da19c 100644 --- a/test/e2e/performanceprofile/functests/1_performance/cpu_management.go +++ b/test/e2e/performanceprofile/functests/1_performance/cpu_management.go @@ -771,34 +771,34 @@ var _ = Describe("[rfe_id:27363][performance] CPU Management", Ordered, func() { }) Context("Runc cpus isolation", func() { - var guaranteedPod, secondPod *corev1.Pod + var guaranteedPod, bestEffortPod *corev1.Pod AfterEach(func() { cmd := []string{"rm", "-f", "/rootfs/var/roothome/create"} nodes.ExecCommand(ctx, workerRTNode, cmd) deleteTestPod(ctx, guaranteedPod) - deleteTestPod(ctx, secondPod) + deleteTestPod(ctx, bestEffortPod) }) It("[test_id: 74461] Verify that runc excludes the cpus used by guaranteed pod", func() { - guaranteedPod, err := getGuaranteedPod(ctx, workerRTNode) + guaranteedPod, err = getGuaranteedPod(ctx, workerRTNode) err = testclient.Client.Create(ctx, guaranteedPod) Expect(err).ToNot(HaveOccurred()) _, err = pods.WaitForCondition(ctx, client.ObjectKeyFromObject(guaranteedPod), corev1.PodReady, corev1.ConditionTrue, 5*time.Minute) Expect(err).ToNot(HaveOccurred()) Expect(guaranteedPod.Status.QOSClass).To(Equal(corev1.PodQOSGuaranteed)) - secondPod, err := getNonGuaranteedPod(ctx, workerRTNode) - err = testclient.Client.Create(ctx, secondPod) + bestEffortPod, err = getNonGuaranteedPod(ctx, workerRTNode) + err = testclient.Client.Create(ctx, bestEffortPod) Expect(err).ToNot(HaveOccurred()) - _, err = pods.WaitForCondition(ctx, client.ObjectKeyFromObject(secondPod), corev1.PodReady, corev1.ConditionTrue, 5*time.Minute) + _, err = pods.WaitForCondition(ctx, client.ObjectKeyFromObject(bestEffortPod), corev1.PodReady, corev1.ConditionTrue, 5*time.Minute) Expect(err).ToNot(HaveOccurred()) containerIDs := make([]string, 2) containerIDs[0], err = pods.GetContainerIDByName(guaranteedPod, "test") Expect(err).ToNot(HaveOccurred()) - containerIDs[1], err = pods.GetContainerIDByName(secondPod, "test") + containerIDs[1], err = pods.GetContainerIDByName(bestEffortPod, "test") Expect(err).ToNot(HaveOccurred()) for _, containerID := range containerIDs { path := fmt.Sprintf("/rootfs/var/run/containers/storage/overlay-containers/%s/userdata/config.json", containerID) @@ -834,7 +834,7 @@ var _ = Describe("[rfe_id:27363][performance] CPU Management", Ordered, func() { runcCpus, err := cpuset.Parse(zippedMatches[1]["cpus"]) Expect(err).ToNot(HaveOccurred()) overlapFound := !guaranteedPodCpus.Intersection(runcCpus).IsEmpty() - Expect(overlapFound).ToNot(BeTrue(), "Overlap found between guaranteedPod cpus and runtime Cpus, not expected behaviour") + Expect(overlapFound).ToNot(BeTrue(), fmt.Sprintf("Overlap found between guaranteedPod cpus (%s) and runtime Cpus (%s), not expected behaviour", guaranteedPodCpus, runcCpus)) }) })