def test_stop_with_grouping_enabled(self):
     service = coordination.Coordination(
         self.name, self.tg, grouping_enabled=True
     )
     service.start()
     service.stop()
     self.assertFalse(service.started)
    def test_start(self):
        service = CoordinatedService()
        service.start()

        self.assertEqual(True, service._coordination_started)
        self.assertIn(service.service_name.encode("utf-8"), service._coordinator.get_groups().get())
        self.assertIn(
            service._coordination_id.encode("utf-8"), service._coordinator.get_members(service.service_name).get()
        )
        service.stop()
    def test_start(self):
        service = CoordinatedService()
        service.start()

        self.assertEqual(True, service._coordination_started)
        self.assertIn(service.service_name,
                      service._coordinator.get_groups().get())
        self.assertIn(
            service._coordination_id,
            service._coordinator.get_members(service.service_name).get())
        service.stop()
    def test_start(self):
        service = CoordinatedService()
        service.start()

        self.assertTrue(service._coordination_started)
        self.assertIn(service.service_name.encode('utf-8'),
                      service._coordinator.get_groups().get())
        self.assertIn(
            service._coordination_id.encode('utf-8'),
            service._coordinator.get_members(service.service_name).get())
        service.stop()
    def test_start(self):
        service = coordination.Coordination(self.name, self.tg)
        service.start()

        self.assertTrue(service.started)
        self.assertIn(self.name.encode('utf-8'),
                      service.coordinator.get_groups().get())
        self.assertIn(
            service.coordination_id.encode('utf-8'),
            service.coordinator.get_members(self.name.encode('utf-8')).get())
        service.stop()
 def test_stop_no_coordination(self):
     self.config(backend_url=None, group="coordination")
     service = CoordinatedService()
     self.assertIsNone(service._coordinator)
     service.start()
     service.stop()
 def test_stop(self):
     service = CoordinatedService()
     service.start()
     service.stop()
     self.assertFalse(service._coordination_started)
 def test_stop_no_coordination(self):
     self.config(backend_url=None, group="coordination")
     service = CoordinatedService()
     self.assertEqual(None, service._coordinator)
     service.start()
     service.stop()
 def test_stop(self):
     service = CoordinatedService()
     service.start()
     service.stop()
     self.assertEqual(False, service._coordination_started)
Exemple #10
0
 def test_stop_no_coordination(self):
     self.config(backend_url=None, group="coordination")
     service = coordination.Coordination(self.name, self.tg)
     self.assertIsNone(service.coordinator)
     service.start()
     service.stop()
Exemple #11
0
 def test_stop(self):
     service = coordination.Coordination(self.name, self.tg)
     service.start()
     service.stop()
     self.assertFalse(service.started)