Skip to content

Commit cef5e5c

Browse files
committed
using right build flag for fuxx testing
Signed-off-by: alanprot <[email protected]>
1 parent 7a2383b commit cef5e5c

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

integration/parquet_querier_test.go

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
1-
//go:build integration
2-
// +build integration
1+
//go:build integration_query_fuzz
2+
// +build integration_query_fuzz
33

44
package integration
55

66
import (
77
"context"
88
"fmt"
9+
"math/rand"
10+
"path/filepath"
11+
"strconv"
12+
"testing"
13+
"time"
14+
15+
"github.com/cortexproject/promqlsmith"
16+
"github.com/prometheus/prometheus/model/labels"
17+
"github.com/stretchr/testify/require"
18+
"github.com/thanos-io/objstore"
19+
"github.com/thanos-io/thanos/pkg/block"
20+
"github.com/thanos-io/thanos/pkg/block/metadata"
21+
922
"github.com/cortexproject/cortex/integration/e2e"
1023
e2edb "github.com/cortexproject/cortex/integration/e2e/db"
1124
"github.com/cortexproject/cortex/integration/e2ecortex"
1225
"github.com/cortexproject/cortex/pkg/storage/bucket"
1326
"github.com/cortexproject/cortex/pkg/storage/tsdb"
1427
"github.com/cortexproject/cortex/pkg/util/log"
1528
cortex_testutil "github.com/cortexproject/cortex/pkg/util/test"
16-
"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

2931
func TestParquetFuzz(t *testing.T) {
@@ -111,6 +113,7 @@ func TestParquetFuzz(t *testing.T) {
111113
require.NoError(t, s.StartAndWaitReady(cortex))
112114

113115
storage, err := e2ecortex.NewS3ClientForMinio(minio, flags["-blocks-storage.s3.bucket-name"])
116+
require.NoError(t, err)
114117
bkt := bucket.NewUserBucketClient("user-1", storage.GetBucket(), nil)
115118

116119
err = block.Upload(ctx, log.Logger, bkt, filepath.Join(dir, id.String()), metadata.NoneFunc)
@@ -120,13 +123,14 @@ func TestParquetFuzz(t *testing.T) {
120123
cortex_testutil.Poll(t, 30*time.Second, true, func() interface{} {
121124
found := false
122125

123-
bkt.Iter(context.Background(), "", func(name string) error {
126+
err := bkt.Iter(context.Background(), "", func(name string) error {
124127
fmt.Println(name)
125128
if name == fmt.Sprintf("parquet-markers/%v-parquet-converter-mark.json", id.String()) {
126129
found = true
127130
}
128131
return nil
129132
}, objstore.WithRecursiveIter())
133+
require.NoError(t, err)
130134
return found
131135
})
132136

@@ -167,7 +171,6 @@ func TestParquetFuzz(t *testing.T) {
167171
ps := promqlsmith.New(rnd, lbls, opts...)
168172

169173
runQueryFuzzTestCases(t, ps, c1, c2, end, start, end, scrapeInterval, 500, false)
170-
fmt.Println(cortex.Metrics())
171174

172175
require.NoError(t, cortex.WaitSumMetricsWithOptions(e2e.Greater(0), []string{"cortex_parquet_queryable_blocks_queried_total"}, e2e.WithLabelMatchers(
173176
labels.MustNewMatcher(labels.MatchEqual, "type", "parquet"))))

pkg/parquetconverter/converter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
cortex_parquet "github.com/cortexproject/cortex/pkg/storage/parquet"
3030
cortex_tsdb "github.com/cortexproject/cortex/pkg/storage/tsdb"
3131
"github.com/cortexproject/cortex/pkg/storage/tsdb/bucketindex"
32-
"github.com/cortexproject/cortex/pkg/util"
32+
"github.com/cortexproject/cortex/pkg/tenant"
3333
util_log "github.com/cortexproject/cortex/pkg/util/log"
3434
"github.com/cortexproject/cortex/pkg/util/services"
3535
"github.com/cortexproject/cortex/pkg/util/validation"
@@ -373,7 +373,7 @@ func (c *Converter) convertUser(ctx context.Context, logger log.Logger, ring rin
373373
}
374374

375375
func (c *Converter) ownUser(r ring.ReadRing, userId string) (bool, error) {
376-
if userId == util.GlobalMarkersDir {
376+
if userId == tenant.GlobalMarkersDir {
377377
// __markers__ is reserved for global markers and no tenant should be allowed to have that name.
378378
return false, nil
379379
}

0 commit comments

Comments
 (0)