use of org.apache.hadoop.hdfs.protocol.SnapshotAccessControlException in project hadoop by apache.
the class TestDisallowModifyROSnapshot method testRename.
@Test(timeout = 60000)
public void testRename() throws Exception {
try {
fs.rename(objInSnapshot, new Path("/invalid/path"));
fail("Didn't throw SnapshotAccessControlException");
} catch (SnapshotAccessControlException e) {
/* Ignored */
}
try {
fs.rename(sub2, objInSnapshot);
fail("Didn't throw SnapshotAccessControlException");
} catch (SnapshotAccessControlException e) {
/* Ignored */
}
try {
fs.rename(sub2, objInSnapshot, (Options.Rename) null);
fail("Didn't throw SnapshotAccessControlException");
} catch (SnapshotAccessControlException e) {
/* Ignored */
}
}
Aggregations