Github user anew commented on a diff in the pull request:
https://github.com/apache/twill/pull/26#discussion_r97875317
--- Diff:
twill-yarn/src/test/java/org/apache/twill/filesystem/HDFSLocationTest.java ---
@@ -47,4 +52,14 @@ public static void finish() {
protected LocationFactory createLocationFactory(String pathBase) throws
Exception {
return new HDFSLocationFactory(dfsCluster.getFileSystem(), pathBase);
}
+
+ // TODO (TWILL-209): figure out how to make MiniDFSCluster enforce
permissions
+ @Ignore
+ @Test(expected = Exception.class)
+ public void testPermissions() throws IOException {
+ // create a directory that does not permit anything
+ dfsCluster.getFileSystem().mkdir(new Path("/a"),
FsPermission.valueOf("----------"));
--- End diff --
Good point. Anyway, this test does not throw an exception and is ignored
because of that. I guess this is a typical problem with using expected=, we can
never know whether it is thrown by the line in the code where we expect. So
should we rewrite all our test cases not to use that? And explicitly fail if
the exception is not thrown?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---