From 6996ece14c9c9f1d7d7626a9f82fde95b858c324 Mon Sep 17 00:00:00 2001 From: Ben Ye Date: Mon, 6 Nov 2023 00:53:00 -0800 Subject: [PATCH] fix flaky TestQueryFrontendNoRetryChunkPool test (#5631) Signed-off-by: Ben Ye --- integration/query_frontend_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/integration/query_frontend_test.go b/integration/query_frontend_test.go index 02054d117e..0dbbadeb10 100644 --- a/integration/query_frontend_test.go +++ b/integration/query_frontend_test.go @@ -499,7 +499,7 @@ func TestQueryFrontendNoRetryChunkPool(t *testing.T) { "-blocks-storage.bucket-store.sync-interval": "5s", }), "") querier := e2ecortex.NewQuerier("querier", e2ecortex.RingStoreConsul, consul.NetworkHTTPEndpoint(), mergeFlags(flags, map[string]string{ - "-blocks-storage.bucket-store.sync-interval": "5s", + "-blocks-storage.bucket-store.sync-interval": "1s", "-querier.frontend-address": queryFrontend.NetworkGRPCEndpoint(), }), "") require.NoError(t, s.StartAndWaitReady(querier, storeGateway)) @@ -509,6 +509,10 @@ func TestQueryFrontendNoRetryChunkPool(t *testing.T) { require.NoError(t, storeGateway.WaitSumMetrics(e2e.Equals(512), "cortex_ring_tokens_total")) require.NoError(t, querier.WaitSumMetricsWithOptions(e2e.GreaterOrEqual(4), []string{"cortex_querier_blocks_scan_duration_seconds"}, e2e.WithMetricCount)) + // Sleep 3 * bucket sync interval to make sure consistency checker + // doesn't consider block is uploaded recently. + time.Sleep(3 * time.Second) + // Query back the series. c, err = e2ecortex.NewClient("", queryFrontend.HTTPEndpoint(), "", "", "user-1") require.NoError(t, err)