예제 #1
0
 def _bootstrap_hosts(self, hosts):
     self._systems_do(lambda s: s.clean_logs(hosts))
     cmd = 'VM={} make --quiet bootstrap-vm'
     executor = Executor()
     for host in hosts:
         executor.run(Shell(cmd.format(host), 'bootstrap ' + host))
     executor.shutdown()  # blocking
예제 #2
0
 def test_if_shutdown_clears_runnable_resources(self):
     executor = Executor()
     executor._future_runnables = Mock()
     executor.shutdown()
     executor._future_runnables.clear.assert_called_once_with()
예제 #3
0
 def test_if_shutdown_clears_function_resources(self):
     executor = Executor()
     executor._function_titles = Mock()
     executor.shutdown()
     executor._function_titles.clear.assert_called_once_with()
예제 #4
0
 def test_if_shutdown_shutdowns_executor(self):
     executor = Executor()
     executor._executor = Mock()
     executor.shutdown()
     executor._executor.shutdown.called_once_with()