Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
TestThermosExecutor.test_task_health_failed is failing. This test is being excluded due to https://issues.apache.org/jira/browse/AURORA-14.
https://git-wip-us.apache.org/repos/asf?p=incubator-aurora.git;a=blob;f=src/test/python/apache/aurora/executor/BUILD;h=b1eb6722fbac2ce93327ed875b62b574423b6488;hb=master#l21
Assuming mesos library is available I get the following failure:
src/test/python/apache/aurora/executor/test_thermos_executor.py:399: TestThermosExecutor.test_task_health_failed Writing log files to disk in /tmp/tmpMm1z4D
FAILED
=================================== FAILURES ===================================
_________________ TestThermosExecutor.test_task_health_failed __________________
self = <test_thermos_executor.TestThermosExecutor object at 0x27f8490>
def test_task_health_failed(self):
proxy_driver = ProxyDriver()
with SignalServer(UnhealthyHandler) as port:
with temporary_dir() as checkpoint_root:
health_check_config = HealthCheckConfig(initial_interval_secs=0.1, interval_secs=0.1)
_, executor = make_executor(proxy_driver,
checkpoint_root,
MESOS_JOB(task=SLEEP60, health_check_config=health_check_config),
ports=
,
fast_status=True,
status_providers=(HealthCheckerProvider(),))
> executor.terminated.wait()
src/test/python/apache/aurora/executor/test_thermos_executor.py:410:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <contextlib.GeneratorContextManager object at 0x27f87d0>
type = <type 'exceptions.TypeError'>, value = "'str' object is not callable"
traceback = <traceback object at 0x2821fc8>
def _exit_(self, type, value, traceback):
if type is None:
try:
self.gen.next()
except StopIteration:
return
else:
raise RuntimeError("generator didn't stop")
else:
if value is None:
- Need to force instantiation so we can reliably
- tell if we get the same exception back
value = type()
try:
> self.gen.throw(type, value, traceback)
/usr/lib64/python2.6/contextlib.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
root_dir = None, cleanup = True
@contextmanager
def temporary_dir(root_dir=None, cleanup=True):
"""
A with-context that creates a temporary directory.
You may specify the following keyword args:
root_dir [path]: The parent directory to create the temporary directory.
cleanup [True/False]: Whether or not to clean up the temporary directory.
"""
path = tempfile.mkdtemp(dir=root_dir)
try:
> yield path
/tmp/tmpqVAuCi/.deps/twitter.common.contextutil-0.1.0-py2.6.egg/twitter/common/contextutil/_init_.py:69:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_thermos_executor.TestThermosExecutor object at 0x27f8490>
def test_task_health_failed(self):
proxy_driver = ProxyDriver()
with SignalServer(UnhealthyHandler) as port:
with temporary_dir() as checkpoint_root:
health_check_config = HealthCheckConfig(initial_interval_secs=0.1, interval_secs=0.1)
_, executor = make_executor(proxy_driver,
checkpoint_root,
MESOS_JOB(task=SLEEP60, health_check_config=health_check_config),
ports=
,
fast_status=True,
> status_providers=(HealthCheckerProvider(),))
src/test/python/apache/aurora/executor/test_thermos_executor.py:409:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
proxy_driver = <test_thermos_executor.ProxyDriver object at 0x27f8690>
checkpoint_root = '/tmp/tmpNVddpe'
task = MesosJob(health_check_config=HealthCheckConfig(initial_interval_secs=0.1,
...traints=ConstraintList()),
name=does_not_matter,
instances=1)
ports =
, fast_status = True
runner_class = <class 'apache.aurora.executor.thermos_task_runner.ThermosTaskRunner'>
status_providers = (<apache.aurora.executor.common.health_checker.HealthCheckerProvider object at 0x27f8850>,)
def make_executor(
proxy_driver,
checkpoint_root,
task,
ports={},
fast_status=False,
runner_class=ThermosTaskRunner,
status_providers=()):
status_manager_class = FastStatusManager if fast_status else StatusManager
runner_provider = make_provider(checkpoint_root, runner_class)
te = FastThermosExecutor(
runner_provider=runner_provider,
status_manager_class=status_manager_class,
sandbox_provider=DefaultTestSandboxProvider,
status_providers=status_providers,
)
ExecutorTimeout(te.launched, proxy_driver, timeout=Amount(100, Time.MILLISECONDS)).start()
task_description = make_task(task, assigned_ports=ports, instanceId=0)
te.launchTask(proxy_driver, task_description)
te.status_manager_started.wait()
sampled_metrics = te.metrics.sample()
assert 'kill_manager.enabled' in sampled_metrics
for checker in te._chained_checker._status_checkers: # hacky
> assert ('%s.enabled' % checker.name()) in sampled_metrics
E TypeError: 'str' object is not callable
src/test/python/apache/aurora/executor/test_thermos_executor.py:212: TypeError
!!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!
===================== 1 failed, 7 passed in 21.80 seconds =====================