joshelser commented on a change in pull request #1230: Backport HBASE-23553 to
branch-2.1
URL: https://github.com/apache/hbase/pull/1230#discussion_r386727193
##########
File path:
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestTableSnapshotScanner.java
##########
@@ -405,19 +404,23 @@ public void testMergeRegion() throws Exception {
}
});
// set file modify time and then run cleaner
- long time = System.currentTimeMillis() -
TimeToLiveHFileCleaner.DEFAULT_TTL * 1000;
+ long cleanerTtl = conf.getLong("hbase.master.hfilecleaner.ttl",
+ TimeToLiveHFileCleaner.DEFAULT_TTL);
+ long time = System.currentTimeMillis() - cleanerTtl * 1000;
traverseAndSetFileTime(HFileArchiveUtil.getArchivePath(conf), time);
UTIL.getMiniHBaseCluster().getMaster().getHFileCleaner().runCleaner();
// scan snapshot
try (TableSnapshotScanner scanner = new TableSnapshotScanner(conf,
UTIL.getDataTestDirOnTestFS(snapshotName), snapshotName, new
Scan(bbb, yyy))) {
verifyScanner(scanner, bbb, yyy);
+ } catch (IOException e) {
+ Assert.assertTrue(e.getCause() != null);
Review comment:
I don't think you need to have this catch for `IOException` nor the outer
catch for `Exception`. If the exception propagates up, it will cause the test
case to fail :)
----------------------------------------------------------------
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