zookeeper-dev mailing list archives

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

    https://github.com/apache/zookeeper/pull/450#discussion_r162946041
  
    --- 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()) {
    --- End diff --
    
    This is always true.


---

Mime
View raw message