ndimiduk commented on code in PR #5867:
URL: https://github.com/apache/hbase/pull/5867#discussion_r1608322367


##########
hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestBackupMerge.java:
##########
@@ -124,4 +128,43 @@ public void TestIncBackupMergeRestore() throws Exception {
     admin.close();
     conn.close();
   }
+
+  @Test
+  public void TestIncBackupMergeRestoreSeparateFs() throws Exception {

Review Comment:
   Huh, strange. We don't usually use C# casing in Java code.



##########
hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestBackupMerge.java:
##########
@@ -124,4 +128,43 @@ public void TestIncBackupMergeRestore() throws Exception {
     admin.close();
     conn.close();
   }
+
+  @Test
+  public void TestIncBackupMergeRestoreSeparateFs() throws Exception {
+
+    // prepare BACKUP_ROOT_DIR on a different filesystem from HBase
+    File tempDir = new File(FileUtils.getTempDirectory(), 
UUID.randomUUID().toString());
+    tempDir.deleteOnExit();
+    BACKUP_ROOT_DIR = tempDir.toURI().toString();
+
+    Connection conn = ConnectionFactory.createConnection(conf1);

Review Comment:
   please use try-with-resources to close the connection. Actually I'm 
surprised that we don't have a static analysis tool warning about this.



##########
hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestBackupMerge.java:
##########
@@ -124,4 +128,43 @@ public void TestIncBackupMergeRestore() throws Exception {
     admin.close();
     conn.close();
   }
+
+  @Test
+  public void TestIncBackupMergeRestoreSeparateFs() throws Exception {
+
+    // prepare BACKUP_ROOT_DIR on a different filesystem from HBase
+    File tempDir = new File(FileUtils.getTempDirectory(), 
UUID.randomUUID().toString());
+    tempDir.deleteOnExit();

Review Comment:
   Over the years, we've found that `deleteOnExit` is unreliable for cleaning 
up unit tests. Better to allocate a path under the maven `target` directory 
instead. I believe that we have utility methods to accomplish this as part of 
HBaseTestingUtility.



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