@@ -7,10 +7,8 @@ import (
7
7
"crypto/x509"
8
8
"crypto/x509/pkix"
9
9
"fmt"
10
- "github.com/thanos-io/thanos/pkg/pool"
11
10
"net/http"
12
11
"os"
13
- "path"
14
12
"path/filepath"
15
13
"strconv"
16
14
"sync"
@@ -23,6 +21,7 @@ import (
23
21
"github.com/prometheus/prometheus/prompb"
24
22
"github.com/stretchr/testify/assert"
25
23
"github.com/stretchr/testify/require"
24
+ "github.com/thanos-io/thanos/pkg/pool"
26
25
27
26
"github.com/cortexproject/cortex/integration/ca"
28
27
"github.com/cortexproject/cortex/integration/e2e"
@@ -452,7 +451,7 @@ func TestQueryFrontendNoRetryChunkPool(t *testing.T) {
452
451
"-blocks-storage.tsdb.block-ranges-period" : blockRangePeriod .String (),
453
452
"-blocks-storage.tsdb.ship-interval" : "1s" ,
454
453
"-blocks-storage.tsdb.retention-period" : ((blockRangePeriod * 2 ) - 1 ).String (),
455
- "-blocks-storage.bucket-store.max_chunk_pool_bytes " : "1" ,
454
+ "-blocks-storage.bucket-store.max-chunk-pool-bytes " : "1" ,
456
455
})
457
456
458
457
// Start dependencies.
@@ -492,24 +491,26 @@ func TestQueryFrontendNoRetryChunkPool(t *testing.T) {
492
491
require .NoError (t , ingester .WaitSumMetrics (e2e .Equals (1 ), "cortex_ingester_memory_series_removed_total" ))
493
492
require .NoError (t , ingester .WaitSumMetrics (e2e .Equals (1 ), "cortex_ingester_memory_series" ))
494
493
494
+ queryFrontend := e2ecortex .NewQueryFrontendWithConfigFile ("query-frontend" , "" , flags , "" )
495
+ require .NoError (t , s .Start (queryFrontend ))
496
+
495
497
// Start the querier and store-gateway, and configure them to frequently sync blocks fast enough to trigger consistency check.
496
498
storeGateway := e2ecortex .NewStoreGateway ("store-gateway" , e2ecortex .RingStoreConsul , consul .NetworkHTTPEndpoint (), mergeFlags (flags , map [string ]string {
497
499
"-blocks-storage.bucket-store.sync-interval" : "5s" ,
498
500
}), "" )
499
- queryFrontend := e2ecortex .NewQueryFrontendWithConfigFile ("query-frontend" , "" , flags , "" )
500
501
querier := e2ecortex .NewQuerier ("querier" , e2ecortex .RingStoreConsul , consul .NetworkHTTPEndpoint (), mergeFlags (flags , map [string ]string {
501
502
"-blocks-storage.bucket-store.sync-interval" : "5s" ,
502
503
"-querier.frontend-address" : queryFrontend .NetworkGRPCEndpoint (),
503
504
}), "" )
504
- require .NoError (t , s .StartAndWaitReady (queryFrontend , querier , storeGateway ))
505
+ require .NoError (t , s .StartAndWaitReady (querier , storeGateway ))
505
506
506
507
// Wait until the querier and store-gateway have updated the ring, and wait until the blocks are old enough for consistency check
507
508
require .NoError (t , querier .WaitSumMetrics (e2e .Equals (512 * 2 ), "cortex_ring_tokens_total" ))
508
509
require .NoError (t , storeGateway .WaitSumMetrics (e2e .Equals (512 ), "cortex_ring_tokens_total" ))
509
510
require .NoError (t , querier .WaitSumMetricsWithOptions (e2e .GreaterOrEqual (4 ), []string {"cortex_querier_blocks_scan_duration_seconds" }, e2e .WithMetricCount ))
510
511
511
512
// Query back the series.
512
- c , err = e2ecortex .NewClient ("" , path . Join ( queryFrontend .HTTPEndpoint (), "/prometheus" ), "" , "" , "user-1" )
513
+ c , err = e2ecortex .NewClient ("" , queryFrontend .HTTPEndpoint (), "" , "" , "user-1" )
513
514
require .NoError (t , err )
514
515
515
516
// We expect request to hit chunk pool exhaustion.
0 commit comments