Github user eolivelli commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/450#discussion_r168301786
  
    --- Diff: 
src/java/test/org/apache/zookeeper/server/persistence/FileTxnSnapLogTest.java 
---
    @@ -35,92 +38,181 @@
     
     public class FileTxnSnapLogTest {
     
    -    /**
    -     * Test verifies the auto creation of data dir and data log dir.
    -     * Sets "zookeeper.datadir.autocreate" to true.
    -     */
    -    @Test
    -    public void testWithAutoCreateDataLogDir() throws IOException {
    -        File tmpDir = ClientBase.createEmptyTestDir();
    -        File dataDir = new File(tmpDir, "data");
    -        File snapDir = new File(tmpDir, "data_txnlog");
    -        Assert.assertFalse("data directory already exists", 
dataDir.exists());
    -        Assert.assertFalse("snapshot directory already exists", 
snapDir.exists());
    +    private File tmpDir;
    +
    +    private File logDir;
    +
    +    private File snapDir;
    +
    +    private File logVersionDir;
    +
    +    private File snapVersionDir;
    +
    +    @Before
    +    public void setUp() throws Exception {
    +        tmpDir = ClientBase.createEmptyTestDir();
    --- End diff --
    
    Maybe it could be a good improvement to start using junit TemporaryFolder 
rule so that the clean up will ve automatically handled by junit


---

Reply via email to