diff --git a/hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/TestHCatClient.java b/hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/TestHCatClient.java index 60195b3..6f74b6f 100644 --- a/hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/TestHCatClient.java +++ b/hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/TestHCatClient.java @@ -19,6 +19,7 @@ package org.apache.hive.hcatalog.api; import java.math.BigInteger; +import java.net.URI; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -133,7 +134,7 @@ public void testBasicDDLCommands() throws Exception { String warehouseDir = System .getProperty("test.warehouse.dir", "/user/hive/warehouse"); String expectedDir = fixPath(warehouseDir).replaceFirst("pfile:///", "pfile:/"); - assertEquals(expectedDir + "/" + db + ".db", testDb.getLocation()); + assertPathEquals(expectedDir + "/" + db + ".db", testDb.getLocation()); ArrayList cols = new ArrayList(); cols.add(new HCatFieldSchema("id", Type.INT, "id comment")); cols.add(new HCatFieldSchema("value", Type.STRING, "value comment")); @@ -183,10 +184,18 @@ public void testBasicDDLCommands() throws Exception { assertEquals("checking " + serdeConstants.SERIALIZATION_NULL_FORMAT, Character.toString('\006'), table2.getSerdeParams().get(serdeConstants.SERIALIZATION_NULL_FORMAT)); - assertEquals((expectedDir + "/" + db + ".db/" + tableTwo).toLowerCase(), table2.getLocation().toLowerCase()); + assertPathEquals((expectedDir + "/" + db + ".db/" + tableTwo).toLowerCase(), table2.getLocation().toLowerCase()); client.close(); } + // Helper method that converts path strings to URIs to compare + // paths directly and ignore scheme insertions + private void assertPathEquals(String path1, String path2) throws Exception { + URI u1 = new URI(path1); + URI u2 = new URI(path2); + assertEquals(u1.getPath(), u2.getPath()); + } + @Test public void testPartitionsHCatClientImpl() throws Exception { HCatClient client = HCatClient.create(new Configuration(hcatConf)); diff --git a/itests/qtest/pom.xml b/itests/qtest/pom.xml index 0a6d71e..6a97011 100644 --- a/itests/qtest/pom.xml +++ b/itests/qtest/pom.xml @@ -114,7 +114,6 @@ minimr - diff --git a/pom.xml b/pom.xml index 426dca8..bb6e0ff 100644 --- a/pom.xml +++ b/pom.xml @@ -63,7 +63,6 @@ ${maven.test.classpath} ${project.build.directory}/tmp ${project.build.directory}/warehouse - pfile:// 1.0b3 @@ -756,7 +755,7 @@ ${test.tmp.dir} ${test.dfs.mkdir} ${test.output.overwrite} - ${test.warehouse.scheme}${test.warehouse.dir} + ${test.warehouse.dir} true src,src1,srcbucket,srcbucket2,src_json,src_thrift,src_sequencefile,srcpart,alltypesorc