// Non existent path
checkStatus("/nonexistent");
checkStatus("/nonexistent/a");
final String username = UserGroupInformation.getCurrentUser().getShortUserName() + "1";
final HftpFileSystem hftp2 = cluster.getHftpFileSystemAs(username, CONF, 0, "somegroup");
{ //test file not found on hftp
final Path nonexistent = new Path("/nonexistent");
try {
hftp2.getFileStatus(nonexistent);
Assert.fail();
} catch(IOException ioe) {
FileSystem.LOG.info("GOOD: getting an exception", ioe);
}
}
{ //test permission error on hftp
final Path dir = new Path("/dir");
fs.setPermission(dir, new FsPermission((short)0));
try {
hftp2.getFileStatus(new Path(dir, "a"));
Assert.fail();
} catch(IOException ioe) {
FileSystem.LOG.info("GOOD: getting an exception", ioe);
}
}