kowshik commented on a change in pull request #10592:
URL: https://github.com/apache/kafka/pull/10592#discussion_r619682506



##########
File path: core/src/test/scala/unit/kafka/log/LogSegmentsTest.scala
##########
@@ -35,6 +39,17 @@ class LogSegmentsTest {
     LogTestUtils.createSegment(offset, logDir, indexIntervalBytes, time)
   }
 
+  @BeforeEach
+  def setup(): Unit = {
+    logDir = TestUtils.tempDir()
+  }
+
+  @AfterEach
+  def teardown(): Unit = {
+    segmentsBuffer.foreach(_.close())

Review comment:
       The segments are already closed from inside `LogSegments#close()` and 
therefore closing these can be skipped in the `tearDown()`. 
https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/log/LogSegments.scala#L78




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to