NihalJain commented on code in PR #7045:
URL: https://github.com/apache/hbase/pull/7045#discussion_r2140647823


##########
hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestBackupDescribe.java:
##########
@@ -107,4 +112,50 @@ public void testBackupDescribeCommand() throws Exception {
     table.close();
     assertTrue(response.indexOf(desc) >= 0);
   }
+
+  @Test
+  public void testBackupDescribeCommandForContinuousBackup() throws Exception {
+    LOG.info("test backup describe on a single table with data: command-line");
+    BackupSystemTable table = new BackupSystemTable(TEST_UTIL.getConnection());
+
+    Path root = TEST_UTIL.getDataTestDirOnTestFS();
+    Path backupWalDir = new Path(root, "testBackupDescribeCommand");
+    FileSystem fs = FileSystem.get(conf1);
+    fs.mkdirs(backupWalDir);
+    conf1.set(CONF_CONTINUOUS_BACKUP_WAL_DIR, backupWalDir.toString());
+
+    String[] backupArgs = new String[] { "create", BackupType.FULL.name(), 
BACKUP_ROOT_DIR, "-t",
+      table1.getNameAsString(), "-" + OPTION_ENABLE_CONTINUOUS_BACKUP };
+    int ret = ToolRunner.run(conf1, new BackupDriver(), backupArgs);
+    assertEquals("Backup should succeed", 0, ret);
+    String backupId = table.getBackupHistory().get(0).getBackupId();

Review Comment:
   ensure this is emprty before we start the test or maybe take the index + 1 
if otherwise



-- 
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: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to