From 6d0cb97fe2baf7e8e472a8f57f541d1d0a18671b Mon Sep 17 00:00:00 2001 From: 0yukali0 Date: Mon, 4 Sep 2023 00:52:45 +0800 Subject: [PATCH] [YUNIKORN-1901] A basic example for the user tracing and the group tracing --- .../user_quota_tracing/user_quota_tracing_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/e2e/user_quota_tracing/user_quota_tracing_test.go b/test/e2e/user_quota_tracing/user_quota_tracing_test.go index b2ba63b70..a447e00e7 100644 --- a/test/e2e/user_quota_tracing/user_quota_tracing_test.go +++ b/test/e2e/user_quota_tracing/user_quota_tracing_test.go @@ -217,12 +217,12 @@ var _ = Describe("QuotaTracking: Two leaf queus for two groups", func() { } for user, quota := range expectedUsers.Users { By(fmt.Sprintf("UserTracker: Check user resource usage of %s in each queue", user)) - userUsage, err := restClient.GetUserResourceUsage(DEFAULT_PARTITION, user) - Ω(err).NotTo(HaveOccurred()) + userUsage, getUserErr := restClient.GetUserResourceUsage(DEFAULT_PARTITION, user) + Ω(getUserErr).NotTo(HaveOccurred()) Ω(userUsage).To(Equal(quota.AppBelongingGroup)) for queuePath, queueQuota := range quota.Queues { - queue, err := yunikorn.GetQueueResourceUsage(userUsage.Queues, queuePath) - Ω(err).NotTo(HaveOccurred()) + queue, getQueueErr := yunikorn.GetQueueResourceUsage(userUsage.Queues, queuePath) + Ω(getQueueErr).NotTo(HaveOccurred()) Ω(queue.RunningApplications).To(Equal(queueQuota.RunningApplications)) usedResource.ParseResourceUsage(yunikorn.ParseResource(queue.ResourceUsage)) Ω(usedResource).To(Equal(queueQuota.Resources)) @@ -239,8 +239,8 @@ var _ = Describe("QuotaTracking: Two leaf queus for two groups", func() { Ω(getUserErr).NotTo(HaveOccurred()) Ω(userUsage).To(Equal(quota.AppBelongingGroup)) for queuePath, queueQuota := range quota.Queues { - queue, getQueueerr := yunikorn.GetQueueResourceUsage(userUsage.Queues, queuePath) - Ω(getQueueerr).NotTo(HaveOccurred()) + queue, getQueueErr := yunikorn.GetQueueResourceUsage(userUsage.Queues, queuePath) + Ω(getQueueErr).NotTo(HaveOccurred()) Ω(queue.RunningApplications).To(Equal(queueQuota.RunningApplications)) usedResource.ParseResourceUsage(yunikorn.ParseResource(queue.ResourceUsage)) Ω(usedResource).To(Equal(queueQuota.Resources))