You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2019/11/20 16:41:18 UTC

[hbase] branch branch-2 updated: HBASE-22607. TestExportSnapshotNoCluster fails intermittently

This is an automated email from the ASF dual-hosted git repository.

stack pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


View the commit online:
https://github.com/apache/hbase/commit/95f25fed86f864629504947b27790bf2bd4dd95e

The following commit(s) were added to refs/heads/branch-2 by this push:
     new 95f25fe  HBASE-22607. TestExportSnapshotNoCluster fails intermittently
95f25fe is described below

commit 95f25fed86f864629504947b27790bf2bd4dd95e
Author: Mingliang Liu <li...@apache.org>
AuthorDate: Wed Jun 19 15:16:35 2019 -0700

    HBASE-22607. TestExportSnapshotNoCluster fails intermittently
---
 .../hadoop/hbase/snapshot/TestExportSnapshotNoCluster.java       | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshotNoCluster.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshotNoCluster.java
index 0720b36..81e905f 100644
--- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshotNoCluster.java
+++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshotNoCluster.java
@@ -17,8 +17,13 @@
  */
 package org.apache.hadoop.hbase.snapshot;
 
+import static org.junit.Assert.assertTrue;
+
+import java.net.URI;
+
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.LocalFileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.HBaseClassTestRule;
 import org.apache.hadoop.hbase.HBaseCommonTestingUtility;
@@ -65,8 +70,10 @@ public class TestExportSnapshotNoCluster {
 
   @BeforeClass
   public static void setUpBeforeClass() throws Exception {
-    testDir = TEST_UTIL.getDataTestDir();
+    // Make sure testDir is on LocalFileSystem
+    testDir = TEST_UTIL.getDataTestDir().makeQualified(URI.create("file:///"), new Path("/"));
     fs = testDir.getFileSystem(TEST_UTIL.getConfiguration());
+    assertTrue("FileSystem '" + fs + "' is not local", fs instanceof LocalFileSystem);
 
     setUpBaseConf(TEST_UTIL.getConfiguration());
   }