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


The following commit(s) were added to refs/heads/branch-2 by this push:
     new bcbeb8e  HBASE-23838 Adding debug logging to a few ExportSnapshot 
tests ADDENDUM to fix failing TestExportSnapshot
bcbeb8e is described below

commit bcbeb8ec6dd2c5b1fff03ad96596a96ec80c447d
Author: stack <st...@apache.org>
AuthorDate: Fri Feb 14 16:08:50 2020 -0800

    HBASE-23838 Adding debug logging to a few ExportSnapshot tests
    ADDENDUM to fix failing TestExportSnapshot
---
 .../org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java     | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git 
a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java
 
b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java
index 4293d46..99d9d65 100644
--- 
a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java
+++ 
b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java
@@ -213,8 +213,7 @@ public class TestExportSnapshot {
       final RegionPredicate bypassregionPredicate, boolean success) throws 
Exception {
     URI hdfsUri = FileSystem.get(conf).getUri();
     FileSystem fs = FileSystem.get(copyDir.toUri(), conf);
-    copyDir = copyDir.makeQualified(hdfsUri, copyDir);
-
+    copyDir = copyDir.makeQualified(fs.getUri(), fs.getWorkingDirectory());
     List<String> opts = new ArrayList<>();
     opts.add("--snapshot");
     opts.add(Bytes.toString(snapshotName));
@@ -227,10 +226,8 @@ public class TestExportSnapshot {
     if (overwrite) opts.add("--overwrite");
 
     // Export Snapshot
-    ExportSnapshot es = new ExportSnapshot();
-    es.setConf(conf);
-    int res = run(conf, es, opts.toArray(new String[opts.size()]));
-    assertEquals(success ? 0 : 1, res);
+    int res = run(conf, new ExportSnapshot(), opts.toArray(new 
String[opts.size()]));
+    assertEquals("success " + success + ", res=" + res, success ? 0 : 1, res);
     if (!success) {
       final Path targetDir = new Path(HConstants.SNAPSHOT_DIR_NAME, 
Bytes.toString(targetName));
       assertFalse(copyDir.toString() + " " + targetDir.toString(),

Reply via email to