def setUp(self): if not os.environ.get("INT"): raise SkipTest("Skipping Slow integration test") self.exchange = "hatestexchange-%s" % str(uuid.uuid4()) self.sysname = "test-%s" % str(uuid.uuid4()) parsed_deployment = yaml.load(deployment_one_pd_two_eea) self.pd_names = parsed_deployment['process-dispatchers'].keys() self.eea_names = [] for node in parsed_deployment['nodes'].values(): for eeagent in node['eeagents'].keys(): self.eea_names.append(eeagent) policy_params = {'preserve_n': 0} executable = {'exec': 'sleep', 'argv': ['1000']} self.setup_harness(exchange=self.exchange, sysname=self.sysname) self.addCleanup(self.cleanup_harness) self.epuharness.start(deployment_str=deployment_one_pd_two_eea) self.block_until_ready(deployment_one_pd_two_eea, self.dashi) self.process_definition_id = uuid.uuid4().hex for pd_name in self.pd_names: pd_client = ProcessDispatcherClient(self.dashi, pd_name) pd_client.create_definition(self.process_definition_id, None, executable, None, None) self.haservice = HighAvailabilityService(policy_parameters=policy_params, process_dispatchers=self.pd_names, exchange=self.exchange, process_definition_id=self.process_definition_id, sysname=self.sysname) self.haservice_thread = tevent.spawn(self.haservice.start) self.dashi = self.haservice.dashi self.haservice_client = HighAvailabilityServiceClient(self.dashi, topic=self.haservice.topic)