krconv commented on code in PR #7523:
URL: https://github.com/apache/hbase/pull/7523#discussion_r2593819731
##########
hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/master/TestBackupLogCleaner.java:
##########
@@ -193,35 +200,140 @@ public void testBackupLogCleaner() throws Exception {
// Taking the minimum timestamp (= 2), this means all WALs preceding B3
can be deleted.
deletable = cleaner.getDeletableFiles(walFilesAfterB5);
assertEquals(toSet(walFilesAfterB2), toSet(deletable));
+ } finally {
+
TEST_UTIL.truncateTable(BackupSystemTable.getTableName(TEST_UTIL.getConfiguration())).close();
}
}
- private Set<FileStatus> mergeAsSet(Collection<FileStatus> toCopy,
Collection<FileStatus> toAdd) {
- Set<FileStatus> result = new LinkedHashSet<>(toCopy);
- result.addAll(toAdd);
- return result;
+ @Test
+ public void testDoesNotDeleteWALsFromNewServers() throws Exception {
Review Comment:
Wow that's an awesome test
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]