From a14fccae784562c44f63ef909374a6b558e2bab8 Mon Sep 17 00:00:00 2001 From: hailin0 Date: Wed, 9 Aug 2023 00:20:20 +0800 Subject: [PATCH] fix --- banyand/tsdb/buffer_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/banyand/tsdb/buffer_test.go b/banyand/tsdb/buffer_test.go index cafb0c69b..7068e9724 100644 --- a/banyand/tsdb/buffer_test.go +++ b/banyand/tsdb/buffer_test.go @@ -199,6 +199,7 @@ var _ = Describe("Buffer", func() { true, &path) Expect(err).ToNot(HaveOccurred()) + defer buffer.Close() // Write buffer & wal var wg sync.WaitGroup @@ -286,6 +287,7 @@ var _ = Describe("Buffer", func() { true, &path) Expect(err).ToNot(HaveOccurred()) + defer buffer.Close() // Check buffer was recovered from wal for i := 0; i < numShards; i++ { @@ -296,8 +298,6 @@ var _ = Describe("Buffer", func() { Expect(exist).To(BeTrue()) Expect(bytes.Equal(expectValue, value)).To(BeTrue()) } - - buffer.Close() }) }) })