Remove unnecessarily long wait times in tests.

Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
pull/515/head
Tom Wilkie 7 years ago committed by Tom Wilkie
parent 2c4e30f2ff
commit beb0052ad0
  1. 6
      pkg/ingester/flush_test.go
  2. 11
      pkg/ingester/ingester_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
}

@ -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{},
}

Loading…
Cancel
Save