diff --git a/tsdb/compact_test.go b/tsdb/compact_test.go index d158ec083..68a8ce166 100644 --- a/tsdb/compact_test.go +++ b/tsdb/compact_test.go @@ -911,8 +911,7 @@ func TestDisableAutoCompactions(t *testing.T) { // Trigger a compaction to check that it was skipped and // no new blocks were created when compaction is disabled. db.DisableCompactions() - ctx := context.Background() - app := db.Appender(ctx) + app := db.Appender(context.Background()) for i := int64(0); i < 3; i++ { _, err := app.Add(label, i*blockRange, 0) testutil.Ok(t, err) @@ -1028,8 +1027,7 @@ func TestDeleteCompactionBlockAfterFailedReload(t *testing.T) { defaultLabel := labels.FromStrings("foo", "bar") // Add some data to the head that is enough to trigger a compaction. - ctx := context.Background() - app := db.Appender(ctx) + app := db.Appender(context.Background()) _, err := app.Add(defaultLabel, 1, 0) testutil.Ok(t, err) _, err = app.Add(defaultLabel, 2, 0)