Esempio n. 1
0
 def test_is_healthy_is_true_when_running_jobs_take_down_host(self):
     top = make_topology(3, True)
     state = State(top,
                   None, {},
                   True,
                   True,
                   progress=Progress(running=set(top.get_down())))
     self.assertEqual(state.is_healthy(), True)
Esempio n. 2
0
 def test_healthy_cluster(self):
     top = make_topology(2, True)
     down = set(top.get_down())
     state = State(top,
                   None, {},
                   True,
                   True,
                   progress=Progress(running=down))
     self.assertEqual(state.is_healthy(), True)
Esempio n. 3
0
 def test_unhealthy_cluster(self):
     top = make_topology(2, True)
     state = State(top, None, {}, True, True)
     self.assertEqual(state.is_healthy(), False)
Esempio n. 4
0
 def test_is_healthy_false(self):
     top = make_topology(3, True)
     state = State(top, None, {}, True, True)
     self.assertEqual(state.is_healthy(), False)