From 979c4254eb31bd1b85f51c7779573964f28c033b Mon Sep 17 00:00:00 2001 From: Hanna Lee Date: Thu, 15 Jul 2021 14:46:12 -0400 Subject: [PATCH] Fix integer division --- test/e2e/apimachinery/garbage_collector.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/apimachinery/garbage_collector.go b/test/e2e/apimachinery/garbage_collector.go index e337a46d60a..493013b6f1c 100644 --- a/test/e2e/apimachinery/garbage_collector.go +++ b/test/e2e/apimachinery/garbage_collector.go @@ -68,7 +68,7 @@ func estimateMaximumPods(c clientset.Interface, min, max int32) int32 { availablePods += 10 } //avoid creating exactly max pods - availablePods *= 8 / 10 + availablePods = int32(float32(availablePods) * 8.0 / 10.0) // bound the top and bottom if availablePods > max { availablePods = max