huaxiangsun commented on a change in pull request #1791: URL: https://github.com/apache/hbase/pull/1791#discussion_r435606974
########## File path: hbase-server/src/test/java/org/apache/hadoop/hbase/master/snapshot/TestSnapshotFileCache.java ########## @@ -85,32 +106,34 @@ public void cleanupFiles() throws Exception { @Test public void testLoadAndDelete() throws IOException { - SnapshotFileCache cache = new SnapshotFileCache(fs, rootDir, PERIOD, 10000000, - "test-snapshot-file-cache-refresh", new SnapshotFiles()); + SnapshotFileCache cache = new SnapshotFileCache(fs, rootDir, workingFs, workingDir, PERIOD, + 10000000, "test-snapshot-file-cache-refresh", new SnapshotFiles()); createAndTestSnapshotV1(cache, "snapshot1a", false, true, false); + createAndTestSnapshotV1(cache, "snapshot1b", true, true, false); createAndTestSnapshotV2(cache, "snapshot2a", false, true, false); + createAndTestSnapshotV2(cache, "snapshot2b", true, true, false); } @Test public void testReloadModifiedDirectory() throws IOException { - SnapshotFileCache cache = new SnapshotFileCache(fs, rootDir, PERIOD, 10000000, - "test-snapshot-file-cache-refresh", new SnapshotFiles()); + SnapshotFileCache cache = new SnapshotFileCache(fs, rootDir, workingFs, workingDir, PERIOD, + 10000000, "test-snapshot-file-cache-refresh", new SnapshotFiles()); - createAndTestSnapshotV1(cache, "snapshot1", false, true, false); + createAndTestSnapshotV1(cache, "snapshot1v1", false, true, false); // now delete the snapshot and add a file with a different name - createAndTestSnapshotV1(cache, "snapshot1", false, false, false); + createAndTestSnapshotV1(cache, "snapshot1v2", false, false, false); Review comment: Oh, probably an over-engineering change I made, will read the comments and revert. ---------------------------------------------------------------- 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: us...@infra.apache.org