You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2022/09/12 13:30:15 UTC

[GitHub] [yunikorn-k8shim] manirajv06 commented on a diff in pull request #460: [YUNIKORN-1281] Add e2e tests

manirajv06 commented on code in PR #460:
URL: https://github.com/apache/yunikorn-k8shim/pull/460#discussion_r968422735


##########
test/e2e/queue_quota_mgmt/queue_quota_mgmt_test.go:
##########
@@ -108,38 +145,39 @@ var _ = Describe("", func() {
 			usedPerctResource.ParseResourceUsage(queueInfo.AbsUsedCapacity)
 
 			By(fmt.Sprintf("App-%d: Verify max capacity on the queue is accurate", iter))
-			Ω(maxResource.GetVCPU()).Should(Equal(maxCPU))
-			Ω(maxResource.GetMemory()).Should(Equal(maxMem * 1000 * 1000))
+			Ω(maxResource.GetResourceValue(siCommon.CPU)).Should(Equal(maxCPU))
+			Ω(maxResource.GetResourceValue(siCommon.Memory)).Should(Equal(maxMem * 1000 * 1000))
+			Ω(maxResource.GetResourceValue("nvidia.com/gpu")).Should(Equal(maxGPU))
 
 			By(fmt.Sprintf("App-%d: Verify used capacity on the queue is accurate after 1st pod deployment", iter))
-			Ω(usedResource.GetVCPU()).Should(Equal(reqCPU * iter))
-			Ω(usedResource.GetMemory()).Should(Equal(reqMem * iter * 1000 * 1000))
+			Ω(usedResource.GetResourceValue(siCommon.CPU)).Should(Equal(reqCPU * iter))
+			Ω(usedResource.GetResourceValue(siCommon.Memory)).Should(Equal(reqMem * iter * 1000 * 1000))
 
 			var perctCPU = int64(math.Floor((float64(reqCPU*iter) / float64(maxCPU)) * 100))
 			var perctMem = int64(math.Floor((float64(reqMem*iter) / float64(maxMem)) * 100))
 			By(fmt.Sprintf("App-%d: Verify used percentage capacity on the queue is accurate after 1st pod deployment", iter))
-			Ω(usedPerctResource.GetVCPU()).Should(Equal(perctCPU))
-			Ω(usedPerctResource.GetMemory()).Should(Equal(perctMem))
+			Ω(usedPerctResource.GetResourceValue(siCommon.CPU)).Should(Equal(perctCPU))
+			Ω(usedPerctResource.GetResourceValue(siCommon.Memory)).Should(Equal(perctMem))
 		}
 
 		By("App-4: Submit another app which exceeds the queue quota limitation")
 		sleepPodConfigs := k8s.SleepPodConfig{NS: ns, Time: 60, CPU: reqCPU, Mem: reqMem}
 		sleepObj, app4PodErr := k8s.InitSleepPod(sleepPodConfigs)
 		Ω(app4PodErr).NotTo(HaveOccurred())
 
-		By(fmt.Sprintf("App-4: Deploy the sleep app:%s to %s namespace", sleepObj.Name, ns))
+		By(fmt.Sprintf("App-N: Deploy the sleep app:%s to %s namespace", sleepObj.Name, ns))

Review Comment:
   Ideally it should be iter+1, named it as "N" as it can be read as nth app/pod. Now, named it with the correct count to avoid confusion.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org