From c2d1c858577cdac009162d095ec80402b049949c Mon Sep 17 00:00:00 2001 From: Xiaochao Dong Date: Tue, 26 Oct 2021 14:06:25 +0800 Subject: [PATCH] close tsdb.head in test case (#9580) Signed-off-by: Xiaochao Dong (@damnever) --- tsdb/head_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsdb/head_test.go b/tsdb/head_test.go index 6043927eac..1018476402 100644 --- a/tsdb/head_test.go +++ b/tsdb/head_test.go @@ -1397,7 +1397,7 @@ func TestWalRepair_DecodingError(t *testing.T) { err = errors.Cause(initErr) // So that we can pick up errors even if wrapped. _, corrErr := err.(*wal.CorruptionErr) require.True(t, corrErr, "reading the wal didn't return corruption error") - require.NoError(t, w.Close()) + require.NoError(t, h.Close()) // Head will close the wal as well. } // Open the db to trigger a repair.