1
0

Test Failure in Travis-ci

This commit is contained in:
Prasanna Rajaperumal
2017-02-21 20:25:01 -08:00
parent 1132f3533d
commit fe5c5e8021
2 changed files with 12 additions and 8 deletions

View File

@@ -46,7 +46,11 @@ public class DatasetNotFoundException extends HoodieException {
if (!fs.exists(metaPathDir) || !fs.isDirectory(metaPathDir)) { if (!fs.exists(metaPathDir) || !fs.isDirectory(metaPathDir)) {
throw new DatasetNotFoundException(metaPathDir.toString()); throw new DatasetNotFoundException(metaPathDir.toString());
} }
} catch (IOException e) { } catch (IllegalArgumentException e) {
// if the base path is file:///, then we have a IllegalArgumentException
throw new DatasetNotFoundException(metaPathDir.toString());
}
catch (IOException e) {
throw new HoodieIOException( throw new HoodieIOException(
"Could not check if dataset " + basePathDir + " is valid dataset", e); "Could not check if dataset " + basePathDir + " is valid dataset", e);
} }

View File

@@ -52,11 +52,11 @@ public class TestHoodieROTablePathFilter {
Path partitionPath = new Path("file://" + basePath + File.separator + "2017/01/01"); Path partitionPath = new Path("file://" + basePath + File.separator + "2017/01/01");
assertTrue("Directories should be accepted", pathFilter.accept(partitionPath)); assertTrue("Directories should be accepted", pathFilter.accept(partitionPath));
assertTrue(pathFilter.accept(new Path("file://" + HoodieTestUtils.getDataFilePath(basePath, "2017/01/01", "001", "f1")))); assertTrue(pathFilter.accept(new Path("file:///" + HoodieTestUtils.getDataFilePath(basePath, "2017/01/01", "001", "f1"))));
assertFalse(pathFilter.accept(new Path("file://" + HoodieTestUtils.getDataFilePath(basePath, "2017/01/01", "001", "f2")))); assertFalse(pathFilter.accept(new Path("file:///" + HoodieTestUtils.getDataFilePath(basePath, "2017/01/01", "001", "f2"))));
assertTrue(pathFilter.accept(new Path("file://" + HoodieTestUtils.getDataFilePath(basePath, "2017/01/01", "001", "f3")))); assertTrue(pathFilter.accept(new Path("file:///" + HoodieTestUtils.getDataFilePath(basePath, "2017/01/01", "001", "f3"))));
assertTrue(pathFilter.accept(new Path("file://" + HoodieTestUtils.getDataFilePath(basePath, "2017/01/01", "002", "f2")))); assertTrue(pathFilter.accept(new Path("file:///" + HoodieTestUtils.getDataFilePath(basePath, "2017/01/01", "002", "f2"))));
assertFalse(pathFilter.accept(new Path("file://" + HoodieTestUtils.getDataFilePath(basePath, "2017/01/01", "003", "f3")))); assertFalse(pathFilter.accept(new Path("file:///" + HoodieTestUtils.getDataFilePath(basePath, "2017/01/01", "003", "f3"))));
} }
@Test @Test
@@ -68,10 +68,10 @@ public class TestHoodieROTablePathFilter {
String path = basePath + File.separator + "nonhoodiefolder"; String path = basePath + File.separator + "nonhoodiefolder";
new File(path).mkdirs(); new File(path).mkdirs();
assertTrue(pathFilter.accept(new Path("file://" + path))); assertTrue(pathFilter.accept(new Path("file:///" + path)));
path = basePath + File.separator + "nonhoodiefolder/somefile"; path = basePath + File.separator + "nonhoodiefolder/somefile";
new File(path).createNewFile(); new File(path).createNewFile();
assertTrue(pathFilter.accept(new Path("file://" + path))); assertTrue(pathFilter.accept(new Path("file:///" + path)));
} }
} }