[openstack-dev] [savanna] unit test failures/errors

Jon Maron jmaron at hortonworks.com
Wed Sep 25 21:25:10 UTC 2013


Hi,

  I can't seem to get a clean run from the py27 unit tests.  On the surface it doesn't seem that my current commit has anything to do with the code paths tested.  I've tried rebuilding my virtual env as well as rebasing but the issue hasn't been resolved.  I've also clones the repository into a different directory and ran the tests with the same failure results (further proving my commit has nothing to do with the failures). I've started debugging thru this code to try to ascertain the issue, but if anyone can comment on what may be the underlying issue I would appreciate it.

======================================================================
ERROR: test_cluster_create_cluster_tmpl_node_group_mixin (savanna.tests.unit.service.validation.test_cluster_create_validation.TestClusterCreateFlavorValidation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/test_cluster_create_validation.py", line 206, in setUp
    api.plugin_base.setup_plugins()
  File "/Users/jmaron/dev/workspaces/savanna/savanna/plugins/base.py", line 197, in setup_plugins
    PLUGINS = PluginManager()
  File "/Users/jmaron/dev/workspaces/savanna/savanna/plugins/base.py", line 110, in __init__
    self._load_all_plugins()
  File "/Users/jmaron/dev/workspaces/savanna/savanna/plugins/base.py", line 129, in _load_all_plugins
    self.plugins[plugin_name] = self._get_plugin_instance(plugin_name)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/plugins/base.py", line 148, in _get_plugin_instance
    plugin_path = CONF['plugin:%s' % plugin_name].plugin_class
  File "/Users/jmaron/dev/workspaces/savanna/.tox/py27/lib/python2.7/site-packages/oslo/config/cfg.py", line 1645, in __getitem__
    return self.__getattr__(key)
  File "/Users/jmaron/dev/workspaces/savanna/.tox/py27/lib/python2.7/site-packages/oslo/config/cfg.py", line 1641, in __getattr__
    raise NoSuchOptError(name)
NoSuchOptError: no such option: plugin:vanilla
-------------------- >> begin captured logging << --------------------
savanna.plugins.base: DEBUG: List of requested plugins: []
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: test_cluster_create_v_cluster_configs (savanna.tests.unit.service.validation.test_cluster_create_validation.TestClusterCreateValidation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/test_cluster_create_validation.py", line 153, in test_cluster_create_v_cluster_configs
    self._assert_cluster_configs_validation(True)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 329, in _assert_cluster_configs_validation
    "Plugin's applicable target 'HDFS' doesn't "
  File "/Users/jmaron/dev/workspaces/savanna/.tox/py27/lib/python2.7/site-packages/mock.py", line 1201, in patched
    return func(*args, **keywargs)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 227, in _assert_create_object_validation
    self._assert_calls(bad_req, bad_req_i)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 211, in _assert_calls
    self.assertEqual(mock.call_args[0][0].message, call_info[2])
AssertionError: "Plugin doesn't contain applicable target 'HDFS'" != "Plugin's applicable target 'HDFS' doesn't contain config with name 's'"
    '"Plugin doesn\'t contain applicable target \'HDFS\'" != "Plugin\'s applicable target \'HDFS\' doesn\'t contain config with name \'s\'"' = '%s != %s' % (safe_repr("Plugin doesn't contain applicable target 'HDFS'"), safe_repr("Plugin's applicable target 'HDFS' doesn't contain config with name 's'"))
    '"Plugin doesn\'t contain applicable target \'HDFS\'" != "Plugin\'s applicable target \'HDFS\' doesn\'t contain config with name \'s\'"' = self._formatMessage('"Plugin doesn\'t contain applicable target \'HDFS\'" != "Plugin\'s applicable target \'HDFS\' doesn\'t contain config with name \'s\'"', '"Plugin doesn\'t contain applicable target \'HDFS\'" != "Plugin\'s applicable target \'HDFS\' doesn\'t contain config with name \'s\'"')
>>  raise self.failureException('"Plugin doesn\'t contain applicable target \'HDFS\'" != "Plugin\'s applicable target \'HDFS\' doesn\'t contain config with name \'s\'"')
    
-------------------- >> begin captured logging << --------------------
savanna.plugins.base: DEBUG: List of requested plugins: ['vanilla', 'hdp']
savanna.plugins.base: INFO: Plugin 'vanilla' defined and loaded
savanna.plugins.base: INFO: Plugin 'hdp' defined and loaded
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: test_cluster_create_v_plugin_name_exists (savanna.tests.unit.service.validation.test_cluster_create_validation.TestClusterCreateValidation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/test_cluster_create_validation.py", line 148, in test_cluster_create_v_plugin_name_exists
    "Savanna doesn't contain plugin "
  File "/Users/jmaron/dev/workspaces/savanna/.tox/py27/lib/python2.7/site-packages/mock.py", line 1201, in patched
    return func(*args, **keywargs)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 227, in _assert_create_object_validation
    self._assert_calls(bad_req, bad_req_i)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 210, in _assert_calls
    self.assertEqual(mock.call_args[0][0].code, call_info[1])
AssertionError: 'NOT_FOUND' != 'INVALID_REFERENCE'
    "'NOT_FOUND' != 'INVALID_REFERENCE'" = '%s != %s' % (safe_repr('NOT_FOUND'), safe_repr('INVALID_REFERENCE'))
    "'NOT_FOUND' != 'INVALID_REFERENCE'" = self._formatMessage("'NOT_FOUND' != 'INVALID_REFERENCE'", "'NOT_FOUND' != 'INVALID_REFERENCE'")
>>  raise self.failureException("'NOT_FOUND' != 'INVALID_REFERENCE'")
    
-------------------- >> begin captured logging << --------------------
savanna.plugins.base: DEBUG: List of requested plugins: ['vanilla', 'hdp']
savanna.plugins.base: INFO: Plugin 'vanilla' defined and loaded
savanna.plugins.base: INFO: Plugin 'hdp' defined and loaded
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: test_cluster_create_v_plugin_vers (savanna.tests.unit.service.validation.test_cluster_create_validation.TestClusterCreateValidation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/test_cluster_create_validation.py", line 40, in test_cluster_create_v_plugin_vers
    "Requested plugin 'vanilla' "
  File "/Users/jmaron/dev/workspaces/savanna/.tox/py27/lib/python2.7/site-packages/mock.py", line 1201, in patched
    return func(*args, **keywargs)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 227, in _assert_create_object_validation
    self._assert_calls(bad_req, bad_req_i)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 210, in _assert_calls
    self.assertEqual(mock.call_args[0][0].code, call_info[1])
AssertionError: 'NOT_FOUND' != 'INVALID_REFERENCE'
    "'NOT_FOUND' != 'INVALID_REFERENCE'" = '%s != %s' % (safe_repr('NOT_FOUND'), safe_repr('INVALID_REFERENCE'))
    "'NOT_FOUND' != 'INVALID_REFERENCE'" = self._formatMessage("'NOT_FOUND' != 'INVALID_REFERENCE'", "'NOT_FOUND' != 'INVALID_REFERENCE'")
>>  raise self.failureException("'NOT_FOUND' != 'INVALID_REFERENCE'")
    
-------------------- >> begin captured logging << --------------------
savanna.plugins.base: DEBUG: List of requested plugins: ['vanilla', 'hdp']
savanna.plugins.base: INFO: Plugin 'vanilla' defined and loaded
savanna.plugins.base: INFO: Plugin 'hdp' defined and loaded
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: test_cluster_create_v_right_data (savanna.tests.unit.service.validation.test_cluster_create_validation.TestClusterCreateValidation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/test_cluster_create_validation.py", line 167, in test_cluster_create_v_right_data
    'default_image_id': '550e8400-e29b-41d4-a716-446655440000'
  File "/Users/jmaron/dev/workspaces/savanna/.tox/py27/lib/python2.7/site-packages/mock.py", line 1201, in patched
    return func(*args, **keywargs)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 227, in _assert_create_object_validation
    self._assert_calls(bad_req, bad_req_i)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 207, in _assert_calls
    self.assertEqual(mock.call_count, 0)
AssertionError: 1 != 0
    '1 != 0' = '%s != %s' % (safe_repr(1), safe_repr(0))
    '1 != 0' = self._formatMessage('1 != 0', '1 != 0')
>>  raise self.failureException('1 != 0')
    
-------------------- >> begin captured logging << --------------------
savanna.plugins.base: DEBUG: List of requested plugins: ['vanilla', 'hdp']
savanna.plugins.base: INFO: Plugin 'vanilla' defined and loaded
savanna.plugins.base: INFO: Plugin 'hdp' defined and loaded
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: test_cluster_template_create_v_cluster_configs (savanna.tests.unit.service.validation.test_cluster_template_create_validation.TestClusterTemplateCreateValidation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/test_cluster_template_create_validation.py", line 28, in test_cluster_template_create_v_cluster_configs
    self._assert_cluster_configs_validation()
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 329, in _assert_cluster_configs_validation
    "Plugin's applicable target 'HDFS' doesn't "
  File "/Users/jmaron/dev/workspaces/savanna/.tox/py27/lib/python2.7/site-packages/mock.py", line 1201, in patched
    return func(*args, **keywargs)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 227, in _assert_create_object_validation
    self._assert_calls(bad_req, bad_req_i)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 211, in _assert_calls
    self.assertEqual(mock.call_args[0][0].message, call_info[2])
AssertionError: "Plugin doesn't contain applicable target 'HDFS'" != "Plugin's applicable target 'HDFS' doesn't contain config with name 's'"
    '"Plugin doesn\'t contain applicable target \'HDFS\'" != "Plugin\'s applicable target \'HDFS\' doesn\'t contain config with name \'s\'"' = '%s != %s' % (safe_repr("Plugin doesn't contain applicable target 'HDFS'"), safe_repr("Plugin's applicable target 'HDFS' doesn't contain config with name 's'"))
    '"Plugin doesn\'t contain applicable target \'HDFS\'" != "Plugin\'s applicable target \'HDFS\' doesn\'t contain config with name \'s\'"' = self._formatMessage('"Plugin doesn\'t contain applicable target \'HDFS\'" != "Plugin\'s applicable target \'HDFS\' doesn\'t contain config with name \'s\'"', '"Plugin doesn\'t contain applicable target \'HDFS\'" != "Plugin\'s applicable target \'HDFS\' doesn\'t contain config with name \'s\'"')
>>  raise self.failureException('"Plugin doesn\'t contain applicable target \'HDFS\'" != "Plugin\'s applicable target \'HDFS\' doesn\'t contain config with name \'s\'"')
    
-------------------- >> begin captured logging << --------------------
savanna.plugins.base: DEBUG: List of requested plugins: ['vanilla', 'hdp']
savanna.plugins.base: INFO: Plugin 'vanilla' defined and loaded
savanna.plugins.base: INFO: Plugin 'hdp' defined and loaded
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: test_cluster_template_create_v_plugin_name_exists (savanna.tests.unit.service.validation.test_cluster_template_create_validation.TestClusterTemplateCreateValidation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/test_cluster_template_create_validation.py", line 211, in test_cluster_template_create_v_plugin_name_exists
    "Savanna doesn't contain plugin "
  File "/Users/jmaron/dev/workspaces/savanna/.tox/py27/lib/python2.7/site-packages/mock.py", line 1201, in patched
    return func(*args, **keywargs)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 227, in _assert_create_object_validation
    self._assert_calls(bad_req, bad_req_i)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 209, in _assert_calls
    self.assertEqual(mock.call_count, call_info[0])
AssertionError: 0 != 1
    '0 != 1' = '%s != %s' % (safe_repr(0), safe_repr(1))
    '0 != 1' = self._formatMessage('0 != 1', '0 != 1')
>>  raise self.failureException('0 != 1')
    
-------------------- >> begin captured logging << --------------------
savanna.plugins.base: DEBUG: List of requested plugins: ['vanilla', 'hdp']
savanna.plugins.base: INFO: Plugin 'vanilla' defined and loaded
savanna.plugins.base: INFO: Plugin 'hdp' defined and loaded
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: test_ng_template_create_v_ng_configs (savanna.tests.unit.service.validation.test_ng_template_validation_create.TestNGTemplateCreateValidation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/test_ng_template_validation_create.py", line 225, in test_ng_template_create_v_ng_configs
    "Plugin's applicable target 'HDFS' doesn't "
  File "/Users/jmaron/dev/workspaces/savanna/.tox/py27/lib/python2.7/site-packages/mock.py", line 1201, in patched
    return func(*args, **keywargs)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 227, in _assert_create_object_validation
    self._assert_calls(bad_req, bad_req_i)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 211, in _assert_calls
    self.assertEqual(mock.call_args[0][0].message, call_info[2])
AssertionError: "Plugin doesn't contain applicable target 'HDFS'" != "Plugin's applicable target 'HDFS' doesn't contain config with name 's'"
    '"Plugin doesn\'t contain applicable target \'HDFS\'" != "Plugin\'s applicable target \'HDFS\' doesn\'t contain config with name \'s\'"' = '%s != %s' % (safe_repr("Plugin doesn't contain applicable target 'HDFS'"), safe_repr("Plugin's applicable target 'HDFS' doesn't contain config with name 's'"))
    '"Plugin doesn\'t contain applicable target \'HDFS\'" != "Plugin\'s applicable target \'HDFS\' doesn\'t contain config with name \'s\'"' = self._formatMessage('"Plugin doesn\'t contain applicable target \'HDFS\'" != "Plugin\'s applicable target \'HDFS\' doesn\'t contain config with name \'s\'"', '"Plugin doesn\'t contain applicable target \'HDFS\'" != "Plugin\'s applicable target \'HDFS\' doesn\'t contain config with name \'s\'"')
>>  raise self.failureException('"Plugin doesn\'t contain applicable target \'HDFS\'" != "Plugin\'s applicable target \'HDFS\' doesn\'t contain config with name \'s\'"')
    
-------------------- >> begin captured logging << --------------------
savanna.plugins.base: DEBUG: List of requested plugins: ['vanilla', 'hdp']
savanna.plugins.base: INFO: Plugin 'vanilla' defined and loaded
savanna.plugins.base: INFO: Plugin 'hdp' defined and loaded
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: test_ng_template_create_v_node_processes (savanna.tests.unit.service.validation.test_ng_template_validation_create.TestNGTemplateCreateValidation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/test_ng_template_validation_create.py", line 92, in test_ng_template_create_v_node_processes
    'Duplicates in node processes have been detected')
  File "/Users/jmaron/dev/workspaces/savanna/.tox/py27/lib/python2.7/site-packages/mock.py", line 1201, in patched
    return func(*args, **keywargs)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 227, in _assert_create_object_validation
    self._assert_calls(bad_req, bad_req_i)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 209, in _assert_calls
    self.assertEqual(mock.call_count, call_info[0])
AssertionError: 0 != 1
    '0 != 1' = '%s != %s' % (safe_repr(0), safe_repr(1))
    '0 != 1' = self._formatMessage('0 != 1', '0 != 1')
>>  raise self.failureException('0 != 1')
    
-------------------- >> begin captured logging << --------------------
savanna.plugins.base: DEBUG: List of requested plugins: ['vanilla', 'hdp']
savanna.plugins.base: INFO: Plugin 'vanilla' defined and loaded
savanna.plugins.base: INFO: Plugin 'hdp' defined and loaded
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: test_ng_template_create_v_right (savanna.tests.unit.service.validation.test_ng_template_validation_create.TestNGTemplateCreateValidation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/test_ng_template_validation_create.py", line 128, in test_ng_template_create_v_right
    'description': 'test node template'
  File "/Users/jmaron/dev/workspaces/savanna/.tox/py27/lib/python2.7/site-packages/mock.py", line 1201, in patched
    return func(*args, **keywargs)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 227, in _assert_create_object_validation
    self._assert_calls(bad_req, bad_req_i)
  File "/Users/jmaron/dev/workspaces/savanna/savanna/tests/unit/service/validation/utils.py", line 207, in _assert_calls
    self.assertEqual(mock.call_count, 0)
AssertionError: 1 != 0
    '1 != 0' = '%s != %s' % (safe_repr(1), safe_repr(0))
    '1 != 0' = self._formatMessage('1 != 0', '1 != 0')
>>  raise self.failureException('1 != 0')
    
-------------------- >> begin captured logging << --------------------
savanna.plugins.base: DEBUG: List of requested plugins: ['vanilla', 'hdp']
savanna.plugins.base: INFO: Plugin 'vanilla' defined and loaded
savanna.plugins.base: INFO: Plugin 'hdp' defined and loaded
--------------------- >> end captured logging << ---------------------

Slowest 5 tests took 3.92 secs:
    1.09    NodePlacementTest.test_one_node_groups_and_no_affinity_group
    0.97    NodePlacementTest.test_two_node_groups_and_one_affinity_group
    0.64    ObjectsFromTemplatesTest.test_cluster_create_from_templates
    0.62    TestClusterRollBack.test_cluster_creation_with_errors
    0.60    ClusterTest.test_duplicate_cluster_create
----------------------------------------------------------------------
Ran 223 tests in 16.267s

FAILED (errors=1, failures=9)
ERROR: InvocationError: '/Users/jmaron/dev/workspaces/savanna/.tox/py27/bin/nosetests -w unit'
______________________________________________________________________________________ summary ______________________________________________________________________________________
ERROR:   py27: commands failed


-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.



More information about the OpenStack-dev mailing list