[Openstack] need help on passing unit/integration tests

Joe Gordon jogo at cloudscaling.com
Mon May 7 18:18:23 UTC 2012


Yun,

I just ran the unit tests on mac via '.run_test.sh' and could not reproduce
your error.  But then again I was using python 2.7 and not python 2.6.

best,
~Joe

On Mon, May 7, 2012 at 9:01 AM, Yun Mao <yunmao at gmail.com> wrote:

> Hi guys,
>
> I can't get my master branch freshly off github to pass the
> run_test.sh script. The errors are as follows. Tried on mac and ubuntu
> 12.04.. Any ideas? Thanks,
>
> Yun
>
>
> ======================================================================
> ERROR: test_json (nova.tests.test_log.JSONFormatterTestCase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/Users/maoy/git/nova/nova/tests/test_log.py", line 183, in test_json
>    data = json.loads(self.stream.getvalue())
>  File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/__init__.py",
> line 307, in loads
>    return _default_decoder.decode(s)
>  File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/decoder.py",
> line 319, in decode
>    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
>  File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/decoder.py",
> line 338, in raw_decode
>    raise ValueError("No JSON object could be decoded")
> ValueError: No JSON object could be decoded
> -------------------- >> begin captured logging << --------------------
> test-json: DEBUG: This is a log line
> --------------------- >> end captured logging << ---------------------
>
> ======================================================================
> ERROR: test_json_exception (nova.tests.test_log.JSONFormatterTestCase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/Users/maoy/git/nova/nova/tests/test_log.py", line 207, in
> test_json_exception
>    data = json.loads(self.stream.getvalue())
>  File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/__init__.py",
> line 307, in loads
>    return _default_decoder.decode(s)
>  File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/decoder.py",
> line 319, in decode
>    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
>  File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/decoder.py",
> line 338, in raw_decode
>    raise ValueError("No JSON object could be decoded")
> ValueError: No JSON object could be decoded
> -------------------- >> begin captured logging << --------------------
> test-json: ERROR: This is exceptional
> Traceback (most recent call last):
>  File "/Users/maoy/git/nova/nova/tests/test_log.py", line 203, in
> test_json_exception
>    raise Exception('This is exceptional')
> Exception: This is exceptional
> --------------------- >> end captured logging << ---------------------
>
> ======================================================================
> FAIL: test_deserialize_remote_exception
> (nova.tests.rpc.test_common.RpcCommonTestCase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/Users/maoy/git/nova/nova/tests/rpc/test_common.py", line 98,
> in test_deserialize_remote_exception
>    self.assertTrue('test message' in unicode(after_exc))
> AssertionError
>
> ======================================================================
> FAIL: test_deserialize_remote_exception_user_defined_exception
> (nova.tests.rpc.test_common.RpcCommonTestCase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/Users/maoy/git/nova/nova/tests/rpc/test_common.py", line 127,
> in test_deserialize_remote_exception_user_defined_exception
>    self.assertTrue('raise FakeUserDefinedException' in unicode(after_exc))
> AssertionError
>
> ======================================================================
> FAIL: test_call_converted_exception
> (nova.tests.rpc.test_kombu.RpcKombuTestCase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/Users/maoy/git/nova/nova/test.py", line 87, in _skipper
>    func(*args, **kw)
>  File "/Users/maoy/git/nova/nova/tests/rpc/test_kombu.py", line 369,
> in test_call_converted_exception
>    self.assertTrue(value in unicode(exc))
> AssertionError:
> -------------------- >> begin captured logging << --------------------
> nova.rpc.common: INFO: Connected to AMQP server on localhost:5672
> nova.rpc.common: INFO: Connected to AMQP server on localhost:5672
> nova.rpc.amqp: ERROR: Exception during message handling
> 2012-05-07 11:54:32 TRACE nova.rpc.amqp Traceback (most recent call last):
> 2012-05-07 11:54:32 TRACE nova.rpc.amqp   File
> "/Users/maoy/git/nova/nova/rpc/amqp.py", line 263, in _process_data
> 2012-05-07 11:54:32 TRACE nova.rpc.amqp     rval =
> node_func(context=ctxt, **node_args)
> 2012-05-07 11:54:32 TRACE nova.rpc.amqp   File
> "/Users/maoy/git/nova/nova/tests/rpc/common.py", line 264, in
> fail_converted
> 2012-05-07 11:54:32 TRACE nova.rpc.amqp     raise
> exception.ConvertedException(explanation=value)
> 2012-05-07 11:54:32 TRACE nova.rpc.amqp ConvertedException: This is
> the exception message
> 2012-05-07 11:54:32 TRACE nova.rpc.amqp
> nova.rpc.common: INFO: Connected to AMQP server on localhost:5672
> nova.rpc.common: ERROR: Returning exception None to caller
> nova.rpc.common: ERROR: ['Traceback (most recent call last):\n', '
> File "/Users/maoy/git/nova/nova/rpc/amqp.py", line 263, in
> _process_data\n    rval = node_func(context=ctxt, **node_args)\n', '
> File "/Users/maoy/git/nova/nova/tests/rpc/common.py", line 264, in
> fail_converted\n    raise
> exception.ConvertedException(explanation=value)\n',
> 'ConvertedException: This is the exception message\n']
> nova.rpc.amqp: ERROR: Exception during message handling
> 2012-05-07 11:54:32 TRACE nova.rpc.amqp Traceback (most recent call last):
> 2012-05-07 11:54:32 TRACE nova.rpc.amqp   File
> "/Users/maoy/git/nova/nova/rpc/amqp.py", line 263, in _process_data
> 2012-05-07 11:54:32 TRACE nova.rpc.amqp     rval =
> node_func(context=ctxt, **node_args)
> 2012-05-07 11:54:32 TRACE nova.rpc.amqp   File
> "/Users/maoy/git/nova/nova/tests/rpc/common.py", line 264, in
> fail_converted
> 2012-05-07 11:54:32 TRACE nova.rpc.amqp     raise
> exception.ConvertedException(explanation=value)
> 2012-05-07 11:54:32 TRACE nova.rpc.amqp ConvertedException: This is
> the exception message
> 2012-05-07 11:54:32 TRACE nova.rpc.amqp
> nova.rpc.common: ERROR: Returning exception None to caller
> nova.rpc.common: ERROR: ['Traceback (most recent call last):\n', '
> File "/Users/maoy/git/nova/nova/rpc/amqp.py", line 263, in
> _process_data\n    rval = node_func(context=ctxt, **node_args)\n', '
> File "/Users/maoy/git/nova/nova/tests/rpc/common.py", line 264, in
> fail_converted\n    raise
> exception.ConvertedException(explanation=value)\n',
> 'ConvertedException: This is the exception message\n']
> --------------------- >> end captured logging << ---------------------
>
> ======================================================================
> FAIL: test_get_rrd_server (nova.tests.test_xenapi.XenAPIVMTestCase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/Users/maoy/git/nova/nova/tests/test_xenapi.py", line 266, in
> test_get_rrd_server
>    self.assertEqual(server_info[1], 'myaddress')
> AssertionError: '' != 'myaddress'
> -------------------- >> begin captured logging << --------------------
> nova.virt.xenapi.fake: DEBUG: Calling getter session.get_this_host
> nova.virt.xenapi.fake: DEBUG: Calling getter host.get_uuid
> nova.virt.xenapi.fake: DEBUG: Calling getter host.get_by_uuid
> nova.virt.xenapi.fake: DEBUG: Calling getter host.get_record
> --------------------- >> end captured logging << ---------------------
>
> ----------------------------------------------------------------------
> Ran 2862 tests in 375.443s
>
> FAILED (SKIP=31, errors=2, failures=4)
> Slowest 5 tests took 24.29 secs:
>    6.77       test_instance_initiated_shutdown_behavior
> (nova.tests.api.ec2.test_cloud.CloudTestCase)
>    5.71       test_create_and_rebuild_server
> (nova.tests.integrated.test_servers.ServersTest)
>    4.68       test_create_multiple_servers
> (nova.tests.integrated.test_servers.ServersTest)
>    3.61       test_stop_with_attached_volume
> (nova.tests.api.ec2.test_cloud.CloudTestCase)
>    3.52       test_deferred_delete
> (nova.tests.integrated.test_servers.ServersTest)
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120507/00349bee/attachment.html>


More information about the Openstack mailing list