示例#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)
示例#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)
示例#3
0
 def test_unhealthy_cluster(self):
     top = make_topology(2, True)
     state = State(top, None, {}, True, True)
     self.assertEqual(state.is_healthy(), False)
示例#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)