diff --git a/tsdb/compact_test.go b/tsdb/compact_test.go index 271a2365e..d158ec083 100644 --- a/tsdb/compact_test.go +++ b/tsdb/compact_test.go @@ -878,7 +878,7 @@ func BenchmarkCompactionFromHead(b *testing.B) { h, err := NewHead(nil, nil, nil, 1000, chunkDir, nil, DefaultStripeSize, nil) testutil.Ok(b, err) for ln := 0; ln < labelNames; ln++ { - app := h.Appender() + app := h.Appender(context.Background()) for lv := 0; lv < labelValues; lv++ { app.Add(labels.FromStrings(fmt.Sprintf("%d", ln), fmt.Sprintf("%d%s%d", lv, postingsBenchSuffix, ln)), 0, 0) } diff --git a/tsdb/querier_bench_test.go b/tsdb/querier_bench_test.go index e4eca1c55..212b67372 100644 --- a/tsdb/querier_bench_test.go +++ b/tsdb/querier_bench_test.go @@ -14,6 +14,7 @@ package tsdb import ( + "context" "fmt" "io/ioutil" "os" @@ -41,7 +42,7 @@ func BenchmarkPostingsForMatchers(b *testing.B) { testutil.Ok(b, h.Close()) }() - app := h.Appender() + app := h.Appender(context.Background()) addSeries := func(l labels.Labels) { app.Add(l, 0, 0) } @@ -147,7 +148,7 @@ func BenchmarkQuerierSelect(b *testing.B) { h, err := NewHead(nil, nil, nil, 1000, chunkDir, nil, DefaultStripeSize, nil) testutil.Ok(b, err) defer h.Close() - app := h.Appender() + app := h.Appender(context.Background()) numSeries := 1000000 for i := 0; i < numSeries; i++ { app.Add(labels.FromStrings("foo", "bar", "i", fmt.Sprintf("%d%s", i, postingsBenchSuffix)), int64(i), 0) diff --git a/tsdb/querier_test.go b/tsdb/querier_test.go index 743255eb1..da11d399c 100644 --- a/tsdb/querier_test.go +++ b/tsdb/querier_test.go @@ -1875,7 +1875,7 @@ func TestPostingsForMatchers(t *testing.T) { testutil.Ok(t, h.Close()) }() - app := h.Appender() + app := h.Appender(context.Background()) app.Add(labels.FromStrings("n", "1"), 0, 0) app.Add(labels.FromStrings("n", "1", "i", "a"), 0, 0) app.Add(labels.FromStrings("n", "1", "i", "b"), 0, 0)