use of si.ijs.maci.ContainerInfo in project ACS by ACS-Community.
the class ContainerHandleTest method testContainerHandles.
public void testContainerHandles() throws Throwable {
String managerRef = AcsLocations.figureOutManagerLocation();
m_logger.info("Using manager reference: " + managerRef);
org.omg.CORBA.Object mgrObj = acsCorba.getORB().string_to_object(managerRef);
Manager manager = ManagerHelper.narrow(mgrObj);
m_logger.info("Manager reference resolved and narrowed.");
final int MANAGER_HANDLE = 0x05555555;
m_logger.info("Querying manager for container info.");
ContainerInfo[] infos = manager.get_container_info(MANAGER_HANDLE, new int[0], "*");
m_logger.info("Got infos from " + infos.length + " container(s).");
for (ContainerInfo info : infos) {
try {
int h = info.reference.get_handle();
m_logger.info("Manager reported handle 0x" + Integer.toHexString(info.h) + ", get_handle() returned 0x" + Integer.toHexString(h));
assertEquals(info.name + " handle mismatch.", info.h, h);
} catch (Throwable th) {
m_logger.info("get_handle() call failed for container with handle 0x" + Integer.toHexString(info.h));
}
}
}
Aggregations