divijvaidya commented on code in PR #14453: URL: https://github.com/apache/kafka/pull/14453#discussion_r1337054159
########## core/src/test/scala/unit/kafka/log/LogLoaderTest.scala: ########## @@ -1800,5 +1822,6 @@ class LogLoaderTest { isRemoteLogEnabled = isRemoteLogEnabled ).load() assertEquals(expectedLogStartOffset, offsets.logStartOffset) + log.close() Review Comment: what happens if the assertion in above line fails? we will have a leak in that case. ########## core/src/test/scala/unit/kafka/log/UnifiedLogTest.scala: ########## @@ -71,6 +72,13 @@ class UnifiedLogTest { @AfterEach def tearDown(): Unit = { brokerTopicStats.close() + try { + log.close() Review Comment: perhaps worth checking that (log != null) otherwise we may have null pointer exception here if the test exits before creating a log object -- 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. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org