DieterDP-ng commented on code in PR #5782:
URL: https://github.com/apache/hbase/pull/5782#discussion_r1547376554


##########
hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestFullRestore.java:
##########
@@ -71,6 +72,44 @@ public void testFullRestoreSingle() throws Exception {
     hba.close();
   }
 
+  @Test
+  public void testFullRestoreSingleWithRegion() throws Exception {
+    LOG.info("test full restore on a single table empty table that has a 
region");
+
+    // This test creates its own table so other tests are not affected (we 
adjust it in this test)
+    TableName tableName = 
TableName.valueOf("table-full-restore-single-region");
+    TEST_UTIL.createTable(tableName, famName);
+
+    Admin admin = TEST_UTIL.getAdmin();
+
+    // Add & remove data to ensure a region is active, but functionally empty
+    Table table = TEST_UTIL.getConnection().getTable(tableName);
+    loadTable(table);
+    admin.flush(tableName);
+    TEST_UTIL.deleteTableData(tableName);
+    admin.flush(tableName);
+
+    admin.majorCompact(tableName);
+    Thread.sleep(5_000);

Review Comment:
   Thanks, didn't know TEST_UTIL supported this.



-- 
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]

Reply via email to