From 3e8b7f53d34463b353bcaca20b45a3211ac1ddbf Mon Sep 17 00:00:00 2001 From: Ben Ye Date: Mon, 17 Oct 2022 15:39:07 -0700 Subject: [PATCH] fix test Signed-off-by: Ben Ye --- integration/getting_started_with_gossiped_ring_test.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/integration/getting_started_with_gossiped_ring_test.go b/integration/getting_started_with_gossiped_ring_test.go index bc7dbd42c83..3b9239310b0 100644 --- a/integration/getting_started_with_gossiped_ring_test.go +++ b/integration/getting_started_with_gossiped_ring_test.go @@ -110,10 +110,6 @@ func TestGettingStartedWithGossipedRing(t *testing.T) { require.Equal(t, model.ValVector, result.Type()) assert.Equal(t, expectedVector, result.(model.Vector)) - // Before flushing the blocks we expect no store-gateway has loaded any block. - require.NoError(t, cortex1.WaitSumMetrics(e2e.Equals(0), "cortex_bucket_store_blocks_loaded")) - require.NoError(t, cortex2.WaitSumMetrics(e2e.Equals(0), "cortex_bucket_store_blocks_loaded")) - // Flush blocks from ingesters to the store. for _, instance := range []*e2ecortex.CortexService{cortex1, cortex2} { res, err = e2e.GetRequest("http://" + instance.HTTPEndpoint() + "/flush") @@ -124,8 +120,8 @@ func TestGettingStartedWithGossipedRing(t *testing.T) { // Given store-gateway blocks sharding is enabled with the default replication factor of 3, // and ingestion replication factor is 1, we do expect the series has been ingested by 1 // single ingester and so we have 1 block shipped from ingesters and loaded by both store-gateways. - require.NoError(t, cortex1.WaitSumMetrics(e2e.Equals(1), "cortex_bucket_store_blocks_loaded")) - require.NoError(t, cortex2.WaitSumMetrics(e2e.Equals(1), "cortex_bucket_store_blocks_loaded")) + require.NoError(t, cortex1.WaitSumMetricsWithOptions(e2e.Equals(1), []string{"cortex_bucket_store_blocks_loaded"}, e2e.WaitMissingMetrics)) + require.NoError(t, cortex2.WaitSumMetricsWithOptions(e2e.Equals(1), []string{"cortex_bucket_store_blocks_loaded"}, e2e.WaitMissingMetrics)) // Make sure that no DNS failures occurred. // No actual DNS lookups are necessarily performed, so we can't really assert on that.