From b4e355d2d91e2b3282baf28f8d6d985a34e2e475 Mon Sep 17 00:00:00 2001 From: Ayoub Mrini Date: Thu, 27 Jun 2024 13:31:46 +0200 Subject: [PATCH] wip --- test/e2e/prometheus_test.go | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/test/e2e/prometheus_test.go b/test/e2e/prometheus_test.go index 425db4cf14..6d812b7e5f 100644 --- a/test/e2e/prometheus_test.go +++ b/test/e2e/prometheus_test.go @@ -67,25 +67,18 @@ func TestPrometheusMetrics(t *testing.T) { } } -// TestPrometheusGOGC verifies that Prometheus containers use the appropriate gogc value. It also helps us stay informed -// about any changes to the default gogc value upstream. If that value changes, this test will fail, prompting us to +// TestPrometheusGOGC verifies that Prometheus containers in HA mode use the appropriate gogc value. It also helps us stay informed +// about any changes to that default gogc value upstream. If that value changes, this test will fail, prompting us to // consider whether the new default value is still suitable. // Refer to this link for some points that may need to be examined https://github.com/openshift/prometheus/pull/206#issuecomment-2182168575. func TestPrometheusGOGC(t *testing.T) { t.Parallel() - infra, err := f.OperatorClient.GetInfrastructure(ctx, "cluster") - require.NoError(t, err) - infraConfig := operator.NewInfrastructureConfig(infra) - - gogc := 100 - if infraConfig.HighlyAvailableInfrastructure() { - gogc = 75 - } + gogc := 75 f.ThanosQuerierClient.WaitForQueryReturn( t, 5*time.Minute, `min(go_gc_gogc_percent{namespace="openshift-monitoring", service="prometheus-k8s", container="kube-rbac-proxy"})`, // kube-rbac-proxy exposes prometheus container's metrics. func(v float64) error { if v != float64(gogc) { - return fmt.Errorf("expected gogc for prometheus to be %f", v) + return fmt.Errorf("expected gogc for prometheus in HA mode to be %d but got %f", gogc, v) } return nil