Skip to content

Commit

Permalink
Update import path in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrco committed Jun 5, 2019
1 parent 1913d0b commit f89f92f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/compact/compact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/oklog/ulid"
"github.com/pkg/errors"
"github.com/prometheus/tsdb"
terrors "github.com/prometheus/tsdb/errors"
)

func TestHaltError(t *testing.T) {
Expand All @@ -32,7 +33,7 @@ func TestHaltMultiError(t *testing.T) {
haltErr := halt(errors.New("halt error"))
nonHaltErr := errors.New("not a halt error")

errs := tsdb.MultiError{nonHaltErr}
errs := terrors.MultiError{nonHaltErr}
testutil.Assert(t, !IsHaltError(errs), "should not be a halt error")

errs.Add(haltErr)
Expand All @@ -43,13 +44,13 @@ func TestRetryMultiError(t *testing.T) {
retryErr := retry(errors.New("retry error"))
nonRetryErr := errors.New("not a retry error")

errs := tsdb.MultiError{nonRetryErr}
errs := terrors.MultiError{nonRetryErr}
testutil.Assert(t, !IsRetryError(errs), "should not be a retry error")

errs = tsdb.MultiError{retryErr}
errs = terrors.MultiError{retryErr}
testutil.Assert(t, IsRetryError(errs), "if all errors are retriable this should return true")

errs = tsdb.MultiError{nonRetryErr, retryErr}
errs = terrors.MultiError{nonRetryErr, retryErr}
testutil.Assert(t, !IsRetryError(errs), "mixed errors should return false")
}

Expand Down

0 comments on commit f89f92f

Please sign in to comment.