diff --git a/pkg/ingester/flush_test.go b/pkg/ingester/flush_test.go index f5c146803a35dff9bef5756e83825bee770c7971..0b53c08e1cf38f000c41e0147fa7b2bd790b4ee8 100644 --- a/pkg/ingester/flush_test.go +++ b/pkg/ingester/flush_test.go @@ -2,7 +2,6 @@ package ingester import ( "fmt" - "os" "sort" "sync" "testing" @@ -10,9 +9,7 @@ import ( "github.com/cortexproject/cortex/pkg/chunk" "github.com/cortexproject/cortex/pkg/ring" - "github.com/cortexproject/cortex/pkg/util" "github.com/cortexproject/cortex/pkg/util/flagext" - "github.com/go-kit/kit/log" "github.com/grafana/loki/pkg/chunkenc" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" @@ -27,7 +24,7 @@ const ( ) func init() { - util.Logger = log.NewLogfmtLogger(os.Stdout) + //util.Logger = log.NewLogfmtLogger(os.Stdout) } func TestChunkFlushingIdle(t *testing.T) { @@ -81,6 +78,7 @@ func defaultIngesterTestConfig() Config { cfg.LifecyclerConfig.ListenPort = func(i int) *int { return &i }(0) cfg.LifecyclerConfig.Addr = "localhost" cfg.LifecyclerConfig.ID = "localhost" + cfg.LifecyclerConfig.FinalSleep = 0 return cfg } diff --git a/pkg/ingester/ingester_test.go b/pkg/ingester/ingester_test.go index 995366b78962c8fcf7894462d2eefbafcf29623e..16f395b5becb67c2cc4d219ee2af72a2e3e23ccb 100644 --- a/pkg/ingester/ingester_test.go +++ b/pkg/ingester/ingester_test.go @@ -13,19 +13,10 @@ import ( "google.golang.org/grpc" "github.com/cortexproject/cortex/pkg/chunk" - "github.com/cortexproject/cortex/pkg/ring" - "github.com/cortexproject/cortex/pkg/util/flagext" ) func TestIngester(t *testing.T) { - var ingesterConfig Config - flagext.DefaultValues(&ingesterConfig) - ingesterConfig.LifecyclerConfig.RingConfig.Mock = ring.NewInMemoryKVClient() - ingesterConfig.LifecyclerConfig.NumTokens = 1 - ingesterConfig.LifecyclerConfig.ListenPort = func(i int) *int { return &i }(0) - ingesterConfig.LifecyclerConfig.Addr = "localhost" - ingesterConfig.LifecyclerConfig.ID = "localhost" - + ingesterConfig := defaultIngesterTestConfig() store := &mockStore{ chunks: map[string][]chunk.Chunk{}, }