1- //go:build integration
2- // +build integration
1+ //go:build integration_query_fuzz
2+ // +build integration_query_fuzz
33
44package integration
55
66import (
77 "context"
88 "fmt"
9+ "math/rand"
10+ "path/filepath"
11+ "strconv"
12+ "testing"
13+ "time"
14+
15+ "github.com/prometheus/prometheus/model/labels"
16+ "github.com/stretchr/testify/require"
17+ "github.com/thanos-io/objstore"
18+ "github.com/thanos-io/thanos/pkg/block"
19+ "github.com/thanos-io/thanos/pkg/block/metadata"
20+
921 "github.com/cortexproject/cortex/integration/e2e"
1022 e2edb "github.com/cortexproject/cortex/integration/e2e/db"
1123 "github.com/cortexproject/cortex/integration/e2ecortex"
@@ -14,16 +26,6 @@ import (
1426 "github.com/cortexproject/cortex/pkg/util/log"
1527 cortex_testutil "github.com/cortexproject/cortex/pkg/util/test"
1628 "github.com/cortexproject/promqlsmith"
17- "github.com/prometheus/prometheus/model/labels"
18- "github.com/stretchr/testify/require"
19- "github.com/thanos-io/objstore"
20- "github.com/thanos-io/thanos/pkg/block"
21- "github.com/thanos-io/thanos/pkg/block/metadata"
22- "math/rand"
23- "path/filepath"
24- "strconv"
25- "testing"
26- "time"
2729)
2830
2931func TestParquetFuzz (t * testing.T ) {
@@ -120,13 +122,14 @@ func TestParquetFuzz(t *testing.T) {
120122 cortex_testutil .Poll (t , 30 * time .Second , true , func () interface {} {
121123 found := false
122124
123- bkt .Iter (context .Background (), "" , func (name string ) error {
125+ err := bkt .Iter (context .Background (), "" , func (name string ) error {
124126 fmt .Println (name )
125127 if name == fmt .Sprintf ("parquet-markers/%v-parquet-converter-mark.json" , id .String ()) {
126128 found = true
127129 }
128130 return nil
129131 }, objstore .WithRecursiveIter ())
132+ require .NoError (t , err )
130133 return found
131134 })
132135
@@ -167,8 +170,7 @@ func TestParquetFuzz(t *testing.T) {
167170 ps := promqlsmith .New (rnd , lbls , opts ... )
168171
169172 runQueryFuzzTestCases (t , ps , c1 , c2 , end , start , end , scrapeInterval , 500 , false )
170- fmt .Println (cortex .Metrics ())
171-
173+
172174 require .NoError (t , cortex .WaitSumMetricsWithOptions (e2e .Greater (0 ), []string {"cortex_parquet_queryable_blocks_queried_total" }, e2e .WithLabelMatchers (
173175 labels .MustNewMatcher (labels .MatchEqual , "type" , "parquet" ))))
174176}
0 commit comments