Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions integration/parquet_querier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,20 @@ func TestParquetFuzz(t *testing.T) {
minio := e2edb.NewMinio(9000, flags["-blocks-storage.s3.bucket-name"])
require.NoError(t, s.StartAndWaitReady(minio))

cortex := e2ecortex.NewSingleBinary("cortex", flags, "")
require.NoError(t, s.StartAndWaitReady(cortex))

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

// Upload the block before starting cortex so the first compactor scan finds
// the complete block and includes it in the bucket index immediately.
err = block.Upload(ctx, log.Logger, bkt, filepath.Join(dir, id.String()), metadata.NoneFunc)
require.NoError(t, err)

cortex := e2ecortex.NewSingleBinary("cortex", flags, "")
require.NoError(t, s.StartAndWaitReady(cortex))

// Wait until we convert the blocks
cortex_testutil.Poll(t, 30*time.Second, true, func() interface{} {
cortex_testutil.Poll(t, 60*time.Second, true, func() interface{} {
found := false
foundBucketIndex := false

Expand Down Expand Up @@ -173,7 +175,7 @@ func TestParquetFuzz(t *testing.T) {
}
ps := promqlsmith.New(rnd, lbls, opts...)

runQueryFuzzTestCases(t, ps, c1, c2, end, start, end, scrapeInterval, 1000, false)
runQueryFuzzTestCases(t, ps, c1, c2, end, start, end, scrapeInterval, 1000, true)

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