HBASE-22194 Snapshot unittests fail on Windows due to invalid file path uri

Signed-off-by: Sergey Shelukhin <sershe@apache.org>
This commit is contained in:
Bahram Chechrazy 2019-04-11 11:33:52 -07:00 committed by Sergey Shelukhin
parent fc6e3fc9d7
commit 2c8b813810
3 changed files with 5 additions and 5 deletions

View File

@ -55,6 +55,6 @@ public class TestExportSnapshotWithTemporaryDirectory extends TestExportSnapshot
public static void setUpBaseConf(Configuration conf) {
TestExportSnapshot.setUpBaseConf(conf);
conf.set(SnapshotDescriptionUtils.SNAPSHOT_WORKING_DIR, "file://" + TEMP_DIR + "/.tmpdir/");
conf.set(SnapshotDescriptionUtils.SNAPSHOT_WORKING_DIR, "file://" + new Path(TEMP_DIR, ".tmpdir").toUri());
}
}

View File

@ -72,8 +72,8 @@ public class TestSnapshotDFSTemporaryDirectory
conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
ConstantSizeRegionSplitPolicy.class.getName());
conf.set(SnapshotDescriptionUtils.SNAPSHOT_WORKING_DIR, UTIL.getDefaultRootDirPath().toString()
+ Path.SEPARATOR + UUID.randomUUID().toString() + Path.SEPARATOR + ".tmpdir"
+ Path.SEPARATOR);
String snapshotPath = UTIL.getDefaultRootDirPath().toString() + Path.SEPARATOR +
UUID.randomUUID().toString() + Path.SEPARATOR + ".tmpdir" + Path.SEPARATOR;
conf.set(SnapshotDescriptionUtils.SNAPSHOT_WORKING_DIR, "file://" + new Path(snapshotPath).toUri());
}
}

View File

@ -121,7 +121,7 @@ public class TestSnapshotTemporaryDirectory {
conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);
conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
ConstantSizeRegionSplitPolicy.class.getName());
conf.set(SnapshotDescriptionUtils.SNAPSHOT_WORKING_DIR, "file://" + TEMP_DIR + "/.tmpdir/");
conf.set(SnapshotDescriptionUtils.SNAPSHOT_WORKING_DIR, "file://" + new Path(TEMP_DIR, ".tmpDir").toUri());
}
@Before public void setup() throws Exception {