MCPcopy Create free account
hub / github.com/apache/mesos / kill

Method kill

src/python/cli_new/lib/cli/tests/base.py:407–427  ·  view source on GitHub ↗

After killing the task, we need to make sure its container has actually been removed from the agent before proceeding.

(self, timeout=TIMEOUT)

Source from the content-addressed store, hash-verified

405
406 # pylint: disable=arguments-differ
407 def kill(self, timeout=TIMEOUT):
408 """
409 After killing the task, we need to make sure its container has
410 actually been removed from the agent before proceeding.
411 """
412 super(Task, self).kill()
413
414 try:
415 # pylint: disable=missing-docstring
416 def container_does_not_exist(data):
417 return not any(container["executor_id"] == self.flags["name"]
418 for container in data)
419
420 self.__wait_for_containers(container_does_not_exist, timeout)
421 except Exception as exception:
422 raise CLIException("Container with name '{name}' still"
423 " exists after timeout: {error}"
424 .format(name=self.flags["name"],
425 error=exception))
426
427 Task.count -= 1
428
429
430def capture_output(command, argv, extra_args=None):

Callers 10

test_execMethod · 0.95
test_exec_exit_statusMethod · 0.95
test_exec_interactiveMethod · 0.95
test_listMethod · 0.95
test_list_allMethod · 0.95
test_launch_binariesMethod · 0.95
killMethod · 0.45
killMethod · 0.45
killMethod · 0.45
exec_commandFunction · 0.45

Calls 2

__wait_for_containersMethod · 0.95
CLIExceptionClass · 0.90

Tested by 6

test_execMethod · 0.76
test_exec_exit_statusMethod · 0.76
test_exec_interactiveMethod · 0.76
test_listMethod · 0.76
test_list_allMethod · 0.76
test_launch_binariesMethod · 0.76