You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/09/30 08:26:13 UTC

[GitHub] [hbase] virajjasani commented on a change in pull request #2472: HBASE-25122 [Flake Test][branch-1] TestExportSnapshotWithTemporaryDirectory

virajjasani commented on a change in pull request #2472:
URL: https://github.com/apache/hbase/pull/2472#discussion_r497331264



##########
File path: hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshotWithTemporaryDirectory.java
##########
@@ -31,24 +27,21 @@
 @Category({MediumTests.class})
 public class TestExportSnapshotWithTemporaryDirectory extends TestExportSnapshot {
 
-  protected static String TEMP_DIR = Paths.get("").toAbsolutePath().toString() + Path.SEPARATOR
-      + UUID.randomUUID().toString();
-
   @BeforeClass
   public static void setUpBeforeClass() throws Exception {
-    setUpBaseConf(TEST_UTIL.getConfiguration());
+    Configuration conf = TEST_UTIL.getConfiguration();
+    TestExportSnapshot.setUpBaseConf(conf);
     TEST_UTIL.startMiniCluster(3);
+    Path rootDir = TEST_UTIL.getMiniHBaseCluster().getMaster().getMasterFileSystem().getRootDir();
+    LOG.info("Root dir: " + rootDir);
+    conf.set(SnapshotDescriptionUtils.SNAPSHOT_WORKING_DIR,
+      new Path(rootDir.getParent(), ".tmpdir").toUri().toString());

Review comment:
       Agree, this is reasonable.




----------------------------------------------------------------
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:
users@infra.apache.org