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:
[email protected]
With regards,
Apache Git Services