close tsdb.head in test case (#9580)

Signed-off-by: Xiaochao Dong (@damnever) <the.xcdong@gmail.com>
This commit is contained in:
Xiaochao Dong 2021-10-26 14:06:25 +08:00 committed by GitHub
parent 0c07663b70
commit c2d1c85857
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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.