Github user mfenes commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/450#discussion_r168891236
--- 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 --
@eolivelli Thanks for the idea. I'll check and use this next time.
---