Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Elliott <[email protected]>
  • Loading branch information
joe-elliott committed Aug 31, 2020
1 parent a14bbec commit da599a5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
5 changes: 4 additions & 1 deletion cmd/tempo/app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,10 @@ func (t *App) stopMemberlistKV() error {
defer cancelFunc()

t.memberlistKV.StopAsync()
t.memberlistKV.AwaitTerminated(ctx)
err := t.memberlistKV.AwaitTerminated(ctx)
if err != nil {
return fmt.Errorf("Failed to stop memberlist %w", err)
}
return nil
}

Expand Down
6 changes: 5 additions & 1 deletion pkg/distributor/distributor.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package distributor

import (
"context"
"fmt"
"net/http"
"strconv"
"sync"
Expand Down Expand Up @@ -139,7 +140,10 @@ func New(cfg Config, clientCfg ingester_client.Config, ingestersRing ring.ReadRi

ctx, cancelFunc := context.WithTimeout(context.Background(), 10*time.Second)
defer cancelFunc()
services.StartAndAwaitRunning(ctx, d.pool)
err := services.StartAndAwaitRunning(ctx, d.pool)
if err != nil {
return nil, fmt.Errorf("Failed to start distributor pool %w", err)
}

return d, nil
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/ingester/ingester_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func TestWal(t *testing.T) {
}

func defaultIngester(t *testing.T, tmpDir string) (*Ingester, []*tempopb.Trace, [][]byte) {
ingesterConfig := defaultIngesterTestConfig(t)
ingesterConfig := defaultIngesterTestConfig()
limits, err := validation.NewOverrides(defaultLimitsTestConfig())
assert.NoError(t, err, "unexpected error creating overrides")

Expand Down Expand Up @@ -193,7 +193,7 @@ func defaultIngester(t *testing.T, tmpDir string) (*Ingester, []*tempopb.Trace,
return ingester, traces, traceIDs
}

func defaultIngesterTestConfig(t *testing.T) Config {
func defaultIngesterTestConfig() Config {
cfg := Config{}
flagext.DefaultValues(&cfg)
cfg.FlushCheckPeriod = 99999 * time.Hour
Expand Down

0 comments on commit da599a5

Please sign in to comment.