示例#1
0
 def test_fail_if_down(self):
     top = make_topology(size=3, has_down_host=True)
     done = []
     running = []
     failed = []
     with self.assertRaises(HostIsDown):
         find_next_host(Strategy.ALL, top, None, Progress(done=done, running=running, failed=failed), True, True, None, None, False)
示例#2
0
    def test_succeed_if_down_with_ignore_down_nodes(self):
        top = make_topology(size=3, has_down_host=True)
        done = []
        running = []
        failed = []

        while True:
            h = find_next_host(Strategy.ALL, top, None, Progress(done=done, running=running, failed=failed), True, True, None, None, True)
            if not h:
                break
            running.append(h)
        self.assertEqual(len(running), 12)
示例#3
0
    def test_all(self):
        top = make_topology(size=3)
        done = []
        running = []
        failed = []

        while True:
            h = find_next_host(Strategy.ALL, top, None, Progress(done=done, running=running, failed=failed), True, True, None, None, False)
            if not h:
                break
            running.append(h)
        self.assertEqual(len(running), 12)