zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From afine <...@git.apache.org>
Subject [GitHub] zookeeper pull request #458: ZOOKEEPER-2967: Add check to validate dataDir a...
Date Wed, 14 Feb 2018 20:32:00 GMT
Github user afine commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/458#discussion_r168301155
  
    --- Diff: src/java/test/org/apache/zookeeper/test/ClientBase.java ---
    @@ -368,22 +368,37 @@ static void verifyThreadTerminated(Thread thread, long millis)
             }
         }
     
    +    public static File createEmptyTestDir() throws IOException {
    +        return createTmpDir(BASETEST, false);
    +    }
     
         public static File createTmpDir() throws IOException {
    -        return createTmpDir(BASETEST);
    +        return createTmpDir(BASETEST, true);
         }
     
    -    static File createTmpDir(File parentDir) throws IOException {
    +    static File createTmpDir(File parentDir, boolean createInitFile) throws IOException
{
             File tmpFile = File.createTempFile("test", ".junit", parentDir);
             // don't delete tmpFile - this ensures we don't attempt to create
             // a tmpDir with a duplicate name
             File tmpDir = new File(tmpFile + ".dir");
             Assert.assertFalse(tmpDir.exists()); // never true if tmpfile does it's job
             Assert.assertTrue(tmpDir.mkdirs());
     
    +        // todo not every tmp directory needs this file
    --- End diff --
    
    why is this todo here?


---

Mime
View raw message