zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfenes <...@git.apache.org>
Subject [GitHub] zookeeper pull request #450: ZOOKEEPER-2967: Add check to validate dataDir a...
Date Tue, 30 Jan 2018 00:13:59 GMT
Github user mfenes commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/450#discussion_r164605860
  
    --- Diff: src/java/test/org/apache/zookeeper/server/persistence/FileTxnSnapLogTest.java
---
    @@ -159,4 +159,222 @@ public void onTxnLoaded(TxnHeader hdr, Record rec) {
                 }
             }
         }
    +
    +    @Test
    +    public void testDirCheckWithCorrectFiles() throws IOException {
    +        File tmpDir = ClientBase.createEmptyTestDir();
    +        File logDir = new File(tmpDir, "logdir");
    +        File snapDir = new File(tmpDir, "snapdir");
    +        File logVersionDir = new File(logDir, FileTxnSnapLog.version +  FileTxnSnapLog.VERSION);
    +        File snapVersionDir = new File(snapDir, FileTxnSnapLog.version +  FileTxnSnapLog.VERSION);
    +
    +        if (!logVersionDir.exists()) {
    +            logVersionDir.mkdirs();
    +        }
    +        if (!snapVersionDir.exists()) {
    --- End diff --
    
    I've removed this, too.


---

Mime
View raw message