Skip to content

Commit

Permalink
minor fixes for downsample test
Browse files Browse the repository at this point in the history
Signed-off-by: metonymic-smokey <ahuja.aditi@gmail.com>
  • Loading branch information
metonymic-smokey committed Nov 5, 2021
1 parent fe3355e commit 8146daf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pkg/compact/compact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"time"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/oklog/ulid"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
Expand Down Expand Up @@ -595,11 +594,10 @@ func TestDownsampleProgressCalculate(t *testing.T) {
err = ds.ProgressCalculate(context.Background(), groups)
testutil.Ok(t, err)
metrics := ds.DownsampleProgressMetrics
for _, key := range keys {
for key := range tcase.expected {
a, err := metrics.NumberOfBlocksDownsampled.GetMetricWithLabelValues(key)
if err != nil {
level.Warn(logger).Log("msg", "could not get number of blocks")
}

testutil.Ok(t, err)
testutil.Equals(t, tcase.expected[key], promtestutil.ToFloat64(a))
}
}); !ok {
Expand Down

0 comments on commit 8146daf

Please sign in to comment.