public Result testNotReadable() throws Exception {
MBeanServer server = MBeanServerFactory.createMBeanServer();
ObjectName unitName = new ObjectName("a:b=c");
server.registerMBean(new Unit(), unitName);
RelationService rService = new RelationService(true);
server.registerMBean(rService, new ObjectName("a:b=d"));
/* Role is not readable */
RoleInfo[] rInfo = { new RoleInfo("role", classPath, false, true) };
rService.createRelationType("relationType", rInfo);
RoleList unitRoles = new RoleList();
unitRoles.add(new Role("role", Collections.singletonList(unitName)));
try {
rService.createRelation("relation", "relationType", unitRoles);
return passed();
} catch (Throwable t) {
return failed(t.toString());
}
}
StructureTest.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:freeVM
作者:
评论列表
文章目录