You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@aurora.apache.org by "Joe Smith (JIRA)" <ji...@apache.org> on 2014/09/04 05:31:51 UTC
[jira] [Commented] (AURORA-682) Test Break- status checker name
property
[ https://issues.apache.org/jira/browse/AURORA-682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14120905#comment-14120905 ]
Joe Smith commented on AURORA-682:
----------------------------------
Since [HealthCheckerThread inherits from ExceptionalThread|https://github.com/apache/incubator-aurora/blob/master/src/main/python/apache/aurora/executor/common/health_checker.py#L28], it also inherits from threading.Thread. [Thread has a name property|https://github.com/python/cpython/blob/2.7/Lib/threading.py#L967].
I'm [considering overriding it, but that's causing the test to hang|http://stackoverflow.com/questions/7019643/overriding-properties-in-python].
> Test Break- status checker name property
> ----------------------------------------
>
> Key: AURORA-682
> URL: https://issues.apache.org/jira/browse/AURORA-682
> Project: Aurora
> Issue Type: Bug
> Reporter: Joe Smith
> Priority: Blocker
>
> CI email that's reproducible on our vagrant image:
> {noformat}
> vagrant@192:~/aurora$ sudo ./pants ./src/test/python/apache/aurora/executor:thermos_executor
> Build operating on top level addresses: set([BuildFileAddress(/home/vagrant/aurora/src/test/python/apache/aurora/executor/BUILD, thermos_executor)])
> ==================================================================================================================================================== test session starts =====================================================================================================================================================
> platform linux2 -- Python 2.7.6 -- py-1.4.23 -- pytest-2.6.1
> plugins: cov, timeout
> collected 15 items
> src/test/python/apache/aurora/executor/test_thermos_executor.py .......FF......
> ========================================================================================================================================================== FAILURES ==========================================================================================================================================================
> ________________________________________________________________________________________________________________________________________ TestThermosExecutor.test_task_health_failed _________________________________________________________________________________________________________________________________________
> self = <test_thermos_executor.TestThermosExecutor object at 0x7fa03de55190>
> 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={'health': port},
> fast_status=True,
> > status_providers=(HealthCheckerProvider(),))
> src/test/python/apache/aurora/executor/test_thermos_executor.py:405:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> proxy_driver = <test_thermos_executor.ProxyDriver object at 0x7fa03de55450>, checkpoint_root = '/tmp/tmpyYqNeQ', task = MesosJob(health_check_config=HealthCheckConfig(initial_interval_secs=0.1,
> ...traints=ConstraintList()),
> name=does_not_matter,
> instances=1), ports = {'health': 60604}
> fast_status = True, runner_class = <class 'apache.aurora.executor.thermos_task_runner.ThermosTaskRunner'>, status_providers = (<apache.aurora.executor.common.health_checker.HealthCheckerProvider object at 0x7fa03de55890>,)
> 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:204: TypeError
> ---------------------------------------------------------------------------------------------------------------------------------------------------- Captured stderr call ----------------------------------------------------------------------------------------------------------------------------------------------------
> Writing log files to disk in /tmp/tmpAiQgSD
> __________________________________________________________________________________________________________________________________________ TestThermosExecutor.test_task_health_ok ___________________________________________________________________________________________________________________________________________
> self = <test_thermos_executor.TestThermosExecutor object at 0x7fa03dcbf2d0>
> def test_task_health_ok(self):
> proxy_driver = ProxyDriver()
> with SignalServer(HealthyHandler) 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=SLEEP2, health_check_config=health_check_config),
> ports={'health': port},
> fast_status=True,
> > status_providers=(HealthCheckerProvider(),))
> src/test/python/apache/aurora/executor/test_thermos_executor.py:422:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> proxy_driver = <test_thermos_executor.ProxyDriver object at 0x7fa03dcbf310>, checkpoint_root = '/tmp/tmpAjs_xw', task = MesosJob(health_check_config=HealthCheckConfig(initial_interval_secs=0.1,
> ...traints=ConstraintList()),
> name=does_not_matter,
> instances=1), ports = {'health': 46160}
> fast_status = True, runner_class = <class 'apache.aurora.executor.thermos_task_runner.ThermosTaskRunner'>, status_providers = (<apache.aurora.executor.common.health_checker.HealthCheckerProvider object at 0x7fa03dcbf590>,)
> 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:204: TypeError
> ---------------------------------------------------------------------------------------------------------------------------------------------------- Captured stderr call ----------------------------------------------------------------------------------------------------------------------------------------------------
> 127.0.0.1 - - [04/Sep/2014 00:07:27] "GET /health HTTP/1.1" 200 -
> Writing log files to disk in /tmp/tmpAiQgSD
> ============================================================================================================================================ 2 failed, 13 passed in 16.67 seconds ============================================================================================================================================
> src.test.python.apache.aurora.executor.thermos_executor ..... FAILURE
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)