def setUp(self): self.engines = [] self.controller = cs.ControllerService() self.controller.startService() self.imultiengine = me.IMultiEngine(self.controller) self.itc = taskmodule.ITaskController(self.controller) self.itc.failurePenalty = 0 self.mec_referenceable = IFCSynchronousMultiEngine(self.imultiengine) self.tc_referenceable = IFCTaskController(self.itc) self.controller_tub = Tub() self.controller_tub.listenOn('tcp:10105:interface=127.0.0.1') self.controller_tub.setLocation('127.0.0.1:10105') mec_furl = self.controller_tub.registerReference(self.mec_referenceable) tc_furl = self.controller_tub.registerReference(self.tc_referenceable) self.controller_tub.startService() self.client_tub = ClientConnector() d = self.client_tub.get_multiengine_client(mec_furl) d.addCallback(self.handle_mec_client) d.addCallback(lambda _: self.client_tub.get_task_client(tc_furl)) d.addCallback(self.handle_tc_client) return d
def setUp(self): self.controller = ControllerService() self.controller.startService() self.multiengine = me.ISynchronousMultiEngine( me.IMultiEngine(self.controller)) self.engines = []