use of org.apache.hadoop.fs.PathNotFoundException in project hadoop by apache.
the class TestRegistryOperations method testPutNoParent.
@Test
public void testPutNoParent() throws Throwable {
ServiceRecord record = new ServiceRecord();
record.set(YarnRegistryAttributes.YARN_ID, "testPutNoParent");
String path = "/path/without/parent";
try {
operations.bind(path, record, 0);
// didn't get a failure
// trouble
RegistryPathStatus stat = operations.stat(path);
fail("Got a status " + stat);
} catch (PathNotFoundException expected) {
// expected
}
}
Aggregations