Skip to content

Commit

Permalink
remove empty file and fix calls to constructor passing nil;
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Tanaka <[email protected]>
  • Loading branch information
pedro-stanaka committed Dec 17, 2024
1 parent 7389313 commit e3b390f
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 23 deletions.
3 changes: 0 additions & 3 deletions pkg/receive/multitsdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ func NewMultiTSDB(
}

for _, option := range options {
if option == nil {
continue
}
option(mt)
}

Expand Down
10 changes: 2 additions & 8 deletions pkg/receive/multitsdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func TestMultiTSDB(t *testing.T) {
NoLockfile: true,
MaxExemplars: 100,
EnableExemplarStorage: true,
}, labels.FromStrings("replica", "01"), "tenant_id", nil, false, metadata.NoneFunc, nil)
}, labels.FromStrings("replica", "01"), "tenant_id", nil, false, metadata.NoneFunc)
defer func() { testutil.Ok(t, m.Close()) }()

testutil.Ok(t, m.Flush())
Expand Down Expand Up @@ -137,7 +137,6 @@ func TestMultiTSDB(t *testing.T) {
nil,
false,
metadata.NoneFunc,
nil,
)
defer func() { testutil.Ok(t, m.Close()) }()

Expand Down Expand Up @@ -174,7 +173,7 @@ func TestMultiTSDB(t *testing.T) {
MaxBlockDuration: (2 * time.Hour).Milliseconds(),
RetentionDuration: (6 * time.Hour).Milliseconds(),
NoLockfile: true,
}, labels.FromStrings("replica", "01"), "tenant_id", nil, false, metadata.NoneFunc, nil)
}, labels.FromStrings("replica", "01"), "tenant_id", nil, false, metadata.NoneFunc)
defer func() { testutil.Ok(t, m.Close()) }()

testutil.Ok(t, m.Flush())
Expand Down Expand Up @@ -443,7 +442,6 @@ func TestMultiTSDBPrune(t *testing.T) {
test.bucket,
false,
metadata.NoneFunc,
nil,
)
defer func() { testutil.Ok(t, m.Close()) }()

Expand Down Expand Up @@ -519,7 +517,6 @@ func TestMultiTSDBRecreatePrunedTenant(t *testing.T) {
objstore.NewInMemBucket(),
false,
metadata.NoneFunc,
nil,
)
defer func() { testutil.Ok(t, m.Close()) }()

Expand Down Expand Up @@ -624,7 +621,6 @@ func TestAlignedHeadFlush(t *testing.T) {
test.bucket,
false,
metadata.NoneFunc,
nil,
)
defer func() { testutil.Ok(t, m.Close()) }()

Expand Down Expand Up @@ -701,7 +697,6 @@ func TestMultiTSDBStats(t *testing.T) {
nil,
false,
metadata.NoneFunc,
nil,
)
defer func() { testutil.Ok(t, m.Close()) }()

Expand Down Expand Up @@ -869,7 +864,6 @@ func BenchmarkMultiTSDB(b *testing.B) {
nil,
false,
metadata.NoneFunc,
nil,
)
defer func() { testutil.Ok(b, m.Close()) }()

Expand Down
5 changes: 1 addition & 4 deletions pkg/receive/receive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ import (
"time"

"github.com/go-kit/log"
"github.com/stretchr/testify/require"

"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/tsdb"

"github.com/stretchr/testify/require"
"github.com/thanos-io/objstore"

"github.com/thanos-io/thanos/pkg/block/metadata"
Expand Down Expand Up @@ -821,7 +819,6 @@ func initializeMultiTSDB(dir string) *MultiTSDB {
bucket,
false,
metadata.NoneFunc,
nil,
)

return m
Expand Down
5 changes: 1 addition & 4 deletions pkg/receive/writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
"testing"
"time"

"github.com/thanos-io/thanos/pkg/receive/writecapnp"

"github.com/efficientgo/core/testutil"
"github.com/go-kit/log"
"github.com/pkg/errors"
Expand All @@ -24,6 +22,7 @@ import (
"github.com/prometheus/prometheus/tsdb/tsdbutil"

"github.com/thanos-io/thanos/pkg/block/metadata"
"github.com/thanos-io/thanos/pkg/receive/writecapnp"
"github.com/thanos-io/thanos/pkg/runutil"
"github.com/thanos-io/thanos/pkg/store/labelpb"
"github.com/thanos-io/thanos/pkg/store/storepb/prompb"
Expand Down Expand Up @@ -416,7 +415,6 @@ func setupMultitsdb(t *testing.T, maxExemplars int64) (log.Logger, *MultiTSDB, A
nil,
false,
metadata.NoneFunc,
nil,
)
t.Cleanup(func() { testutil.Ok(t, m.Close()) })

Expand Down Expand Up @@ -482,7 +480,6 @@ func benchmarkWriter(b *testing.B, labelsNum int, seriesNum int, generateHistogr
nil,
false,
metadata.NoneFunc,
nil,
)
b.Cleanup(func() { testutil.Ok(b, m.Close()) })

Expand Down
4 changes: 0 additions & 4 deletions pkg/store/types/matcher.go

This file was deleted.

0 comments on commit e3b390f

Please sign in to comment.