Skip to content

Commit

Permalink
fix integration test
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Ye <[email protected]>
  • Loading branch information
yeya24 committed Oct 17, 2022
1 parent d8fbfe0 commit 0345fb3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion integration/querier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ func TestQuerierWithBlocksStorageRunningInMicroservicesMode(t *testing.T) {
// we don't known which store-gateway instance will synch the blocks, so we need to wait on
// metrics extracted from all instances.
if testCfg.blocksShardingStrategy != "" {
require.NoError(t, storeGateways.WaitSumMetrics(e2e.Equals(2), "cortex_bucket_store_blocks_loaded"))
// If shuffle sharding is enabled and we have tenant shard size set to 1,
// then the metric only appears in one store gateway instance.
require.NoError(t, storeGateways.WaitSumMetricsWithOptions(e2e.Equals(2), []string{"cortex_bucket_store_blocks_loaded"}, e2e.SkipMissingMetrics))
} else {
require.NoError(t, storeGateways.WaitSumMetrics(e2e.Equals(float64(2*storeGateways.NumInstances())), "cortex_bucket_store_blocks_loaded"))
}
Expand Down

0 comments on commit 0345fb3

Please sign in to comment.