From 20420986a449dfc4b1d62e48f7996dd48be3b512 Mon Sep 17 00:00:00 2001 From: Karol Golab Date: Fri, 24 Mar 2023 14:19:07 +0100 Subject: [PATCH] Make the "OOMing pods under VPA" test more robust. --- vertical-pod-autoscaler/e2e/v1/autoscaling_utils.go | 12 ++++++------ vertical-pod-autoscaler/e2e/v1/full_vpa.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/vertical-pod-autoscaler/e2e/v1/autoscaling_utils.go b/vertical-pod-autoscaler/e2e/v1/autoscaling_utils.go index 8aee8447305b..1dccd850213c 100644 --- a/vertical-pod-autoscaler/e2e/v1/autoscaling_utils.go +++ b/vertical-pod-autoscaler/e2e/v1/autoscaling_utils.go @@ -67,7 +67,6 @@ const ( var ( resourceConsumerImage = imageutils.GetE2EImage(imageutils.ResourceConsumer) - stressCommand = []string{"/stress", "--mem-total", "10000000000", "--logtostderr", "--mem-alloc-size", "50000"} ) var ( @@ -436,16 +435,17 @@ func runOomingReplicationController(c clientset.Interface, ns, name string, repl ginkgo.By(fmt.Sprintf("Running OOMing RC %s with %v replicas", name, replicas)) rcConfig := testutils.RCConfig{ - Client: c, - Image: stressImage, - Command: stressCommand, + Client: c, + Image: stressImage, + // request exactly 1025 MiB, in a single chunk (1 MiB above the limit) + Command: []string{"/stress", "--mem-total", "1074790400", "--logtostderr", "--mem-alloc-size", "1074790400"}, Name: name, Namespace: ns, Timeout: timeoutRC, Replicas: replicas, Annotations: make(map[string]string), - MemRequest: 1024 * 1024 * 300, - MemLimit: 1024 * 1024 * 500, + MemRequest: 1024 * 1024 * 1024, + MemLimit: 1024 * 1024 * 1024, } dpConfig := testutils.DeploymentConfig{ diff --git a/vertical-pod-autoscaler/e2e/v1/full_vpa.go b/vertical-pod-autoscaler/e2e/v1/full_vpa.go index d96277663069..811f84aca3a4 100644 --- a/vertical-pod-autoscaler/e2e/v1/full_vpa.go +++ b/vertical-pod-autoscaler/e2e/v1/full_vpa.go @@ -43,7 +43,7 @@ const ( // the initial values should be outside minimal bounds initialCPU = int64(10) // mCPU initialMemory = int64(10) // MB - oomTestTimeout = 12 * time.Minute + oomTestTimeout = 8 * time.Minute ) var _ = FullVpaE2eDescribe("Pods under VPA", func() {