@@ -110,10 +110,6 @@ func TestGettingStartedWithGossipedRing(t *testing.T) {
110110 require .Equal (t , model .ValVector , result .Type ())
111111 assert .Equal (t , expectedVector , result .(model.Vector ))
112112
113- // Before flushing the blocks we expect no store-gateway has loaded any block.
114- require .NoError (t , cortex1 .WaitSumMetrics (e2e .Equals (0 ), "cortex_bucket_store_blocks_loaded" ))
115- require .NoError (t , cortex2 .WaitSumMetrics (e2e .Equals (0 ), "cortex_bucket_store_blocks_loaded" ))
116-
117113 // Flush blocks from ingesters to the store.
118114 for _ , instance := range []* e2ecortex.CortexService {cortex1 , cortex2 } {
119115 res , err = e2e .GetRequest ("http://" + instance .HTTPEndpoint () + "/flush" )
@@ -124,8 +120,8 @@ func TestGettingStartedWithGossipedRing(t *testing.T) {
124120 // Given store-gateway blocks sharding is enabled with the default replication factor of 3,
125121 // and ingestion replication factor is 1, we do expect the series has been ingested by 1
126122 // single ingester and so we have 1 block shipped from ingesters and loaded by both store-gateways.
127- require .NoError (t , cortex1 .WaitSumMetrics (e2e .Equals (1 ), "cortex_bucket_store_blocks_loaded" ))
128- require .NoError (t , cortex2 .WaitSumMetrics (e2e .Equals (1 ), "cortex_bucket_store_blocks_loaded" ))
123+ require .NoError (t , cortex1 .WaitSumMetricsWithOptions (e2e .Equals (1 ), [] string { "cortex_bucket_store_blocks_loaded" }, e2e . WaitMissingMetrics ))
124+ require .NoError (t , cortex2 .WaitSumMetricsWithOptions (e2e .Equals (1 ), [] string { "cortex_bucket_store_blocks_loaded" }, e2e . WaitMissingMetrics ))
129125
130126 // Make sure that no DNS failures occurred.
131127 // No actual DNS lookups are necessarily performed, so we can't really assert on that.
0 commit comments