use of com.twitter.distributedlog.thrift.AccessControlEntry in project distributedlog by twitter.
the class TestZKAccessControl method testDeleteZKAccessControl.
@Test(timeout = 60000)
public void testDeleteZKAccessControl() throws Exception {
String zkPath = "/delete-zk-access-control";
AccessControlEntry ace = new AccessControlEntry();
ace.setDenyDelete(true);
ZKAccessControl zkac = new ZKAccessControl(ace, zkPath);
Await.result(zkac.create(zkc));
ZKAccessControl readZKAC = Await.result(ZKAccessControl.read(zkc, zkPath, null));
assertEquals(zkac, readZKAC);
Await.result(ZKAccessControl.delete(zkc, zkPath));
try {
Await.result(ZKAccessControl.read(zkc, zkPath, null));
} catch (KeeperException.NoNodeException nne) {
// expected.
}
Await.result(ZKAccessControl.delete(zkc, zkPath));
}
Aggregations