def test_DeviceManagerRegisterWhileDomainManagerCrashed(self):
domBooter, domMgr = self.launchDomainManager(endpoint="giop:tcp::5679", dbURI=self._dbfile)
self.assertNotEqual(domMgr, None)
# Forcibly terminate the domain manager to simulate a crash
os.kill(domBooter.pid, signal.SIGKILL)
if not self.waitTermination(domBooter):
self.fail("DomainManager failed to die")
time.sleep(2)
# Start the node; we cannot get the object reference because the
# DomainManager is down, so waiting is pointless right now.
dcdFile = "/nodes/test_PortTestDevice_node/DeviceManager.dcd.xml"
devBooter, unused = self.launchDeviceManager(dcdFile, wait=False)
time.sleep(2)
# Restart the DomainManager
domBooter, domMgr = self.launchDomainManager(endpoint="giop:tcp::5679", dbURI=self._dbfile)
self.assertNotEqual(domMgr, None)
# Wait for the DeviceManager and make sure it registers.
devMgr = self.waitDeviceManager(devBooter, dcdFile)
self.assertNotEqual(devMgr, None)
test_09_DomainPersistence.py 文件源码
python
阅读 43
收藏 0
点赞 0
评论 0
评论列表
文章目录