From 93e59220c5c876a5985f7edc5b10407195f8e0c1 Mon Sep 17 00:00:00 2001 From: Zihong Zheng Date: Thu, 16 Sep 2021 14:26:48 -0700 Subject: [PATCH] Fix core calculation for dns autoscaler test. It didn't account for the return value being a string instead of an integer. --- test/e2e/autoscaling/dns_autoscaling.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/test/e2e/autoscaling/dns_autoscaling.go b/test/e2e/autoscaling/dns_autoscaling.go index 6b4fc1d4b72..87b57ae594d 100644 --- a/test/e2e/autoscaling/dns_autoscaling.go +++ b/test/e2e/autoscaling/dns_autoscaling.go @@ -255,13 +255,7 @@ func getSchedulableCores(nodes []v1.Node) int64 { sc.Add(node.Status.Allocatable[v1.ResourceCPU]) } } - - scInt64, scOk := sc.AsInt64() - if !scOk { - framework.Logf("Unable to compute integer values of schedulable cores in the cluster") - return 0 - } - return scInt64 + return sc.Value() } func fetchDNSScalingConfigMap(c clientset.Interface) (*v1.ConfigMap, error) {