Exemplo n.º 1
0
 def test_allocate_slave_increments_by_per_slave_when_max_not_inf_and_less_than_num(self):
     build = Build(BuildRequest({}))
     build._max_executors_per_slave = 5
     slave = Mock()
     slave.num_executors = 10
     build.allocate_slave(slave)
     self.assertEqual(build._num_executors_allocated, 5, "Should be incremented by num executors")
Exemplo n.º 2
0
 def test_allocate_slave_increments_by_per_slave_when_max_not_inf_and_less_than_num(
         self):
     build = Build(BuildRequest({}))
     build._max_executors_per_slave = 5
     slave = Mock()
     slave.num_executors = 10
     build.allocate_slave(slave)
     self.assertEqual(build._num_executors_allocated, 5,
                      "Should be incremented by num executors")