test_09_DomainPersistence.py 文件源码

python
阅读 43 收藏 0 点赞 0 评论 0

项目:core-framework 作者: RedhawkSDR 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号