Skip to content

Commit

Permalink
fix flaky TestQueryFrontendNoRetryChunkPool test (#5631)
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Ye <[email protected]>
  • Loading branch information
yeya24 authored Nov 6, 2023
1 parent afb979b commit 6996ece
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion integration/query_frontend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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)
Expand Down

0 comments on commit 6996ece

Please sign in to comment.