zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] hanm commented on a change in pull request #1069: ZOOKEEPER-3056: Fails to load database with missing snapshot file but with valid transaction log file.
Date Fri, 30 Aug 2019 20:34:12 GMT
hanm commented on a change in pull request #1069: ZOOKEEPER-3056: Fails to load database with
missing snapshot file but with valid transaction log file.
URL: https://github.com/apache/zookeeper/pull/1069#discussion_r319666491
 
 

 ##########
 File path: zookeeper-server/src/test/java/org/apache/zookeeper/test/EmptiedSnapshotRecoveryTest.java
 ##########
 @@ -119,7 +125,15 @@ public void testRestoreWithEmptySnapFiles() throws Exception {
      */
     @Test
     public void testRestoreWithNoSnapFiles() throws Exception {
-        runTest(false);
+        runTest(false, false);
+    }
+
+    @Test
+    public void testRestoreWithTrustedEmptySnapFiles() throws Exception {
+        FileTxnSnapLog.setTrustEmptySnapshotFlag(true);
 
 Review comment:
   good catch, and find bug complains about something similar. I changed the flag variable
to an instance variable instead and move the set / check logic inside the shared test implementation.
Tests will not be interfering with each other.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message