[ https://issues.apache.org/jira/browse/KAFKA-1258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13898307#comment-13898307 ]
Jay Kreps commented on KAFKA-1258: ---------------------------------- Yeah this annoys me too. The core problem is that java provides File.deleteOnExit but this doesn't work for directories. Instead what we should do is change TestUtils.createTempDir to add a shutdown hook that deletes the directory recursively. > Delete temporary data directory after unit test finishes > -------------------------------------------------------- > > Key: KAFKA-1258 > URL: https://issues.apache.org/jira/browse/KAFKA-1258 > Project: Kafka > Issue Type: Bug > Reporter: Guozhang Wang > Fix For: 0.9.0 > > > Today in unit testsuite most of the time when a test case is setup a > temporary directory will be created with a random int as suffix, and will not > be deleted after the test. After a few unit tests this will create tons of > directories in java.io.tmpdir (/tmp for Linux). Would be better to remove > them for clean unit tests. -- This message was sent by Atlassian JIRA (v6.1.5#6160)