soarez commented on code in PR #15289: URL: https://github.com/apache/kafka/pull/15289#discussion_r1489605994
########## core/src/test/scala/unit/kafka/utils/TestUtils.scala: ########## @@ -137,7 +137,18 @@ object TestUtils extends Logging { val parentFile = new File(parent) parentFile.mkdirs() - JTestUtils.tempDirectory(parentFile.toPath, null) + val result = JTestUtils.tempDirectory(parentFile.toPath, null) + + parentFile.deleteOnExit() + Exit.addShutdownHook("delete-temp-log-dir-on-exit", { + try { + Utils.delete(parentFile) Review Comment: Do we need both `parentFile.deleteOnExit()` and `Utils.delete(parentFile)` on the shutdown hook? -- 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