From 48b9afd14b8a42791829c1b5ea0ebefb888fce38 Mon Sep 17 00:00:00 2001 From: Annanay Date: Thu, 30 Jul 2020 17:25:51 +0530 Subject: [PATCH] Address comments Signed-off-by: Annanay --- tsdb/compact_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tsdb/compact_test.go b/tsdb/compact_test.go index d158ec083d..68a8ce1667 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)