[openstack-dev] [metering] mongo tests fail when using ming

Doug Hellmann doug.hellmann at dreamhost.com
Tue Sep 18 13:48:25 UTC 2012


On Mon, Sep 17, 2012 at 6:39 PM, John Tran <njhtran at gmail.com> wrote:

> When I use CEILOMETER_LIVE_TEST=1, all tests pass just fine but just
> so darn slow in comparison to the MIM tests.  Therefore, I'm trying to
> figure out what my problem is, maybe someone knows the answer.   Here
> is one of the tests traceback but I've added some custom print stubs
> to help troubleshoot.
>

Are you using the version of Ming from https://github.com/dreamhost/Ming?
It has some patches that may not have been accepted upstream, yet (I'm
working with Rick Copeland on that). Our test requirements file should be
pointing to that version, but it probably won't upgrade cleanly if you
already had something installed. Try "tox -r -e py27" to rebuild the test
virtualenv and see if that helps.

Doug


>
> I've stubbed 'QUERY' to see what the filter is.   It's showing a
> filter expression to get any raw events $gte (2012, 7, 2, 10, 42) &&
> $lt (2012, 7, 2, 10, 43).
>
> The results (stubbed 'EVENTS') are coming back empty, although the
> expected result should have 1 meter object.
>
> The stubbed 'ALL' is a list of timestamps for ALL meter objects and
> clearly I see one that has a timestamp of 2012-07-02 10:42:00, which
> should be EQUAL to the $gte argument.
>
> $ ./run_tests.sh
> storage.test_impl_mongodb:MeterTest.test_get_raw_events_by_both_times
> + rm -rf cover
> + [ ! -z  ]
> + nosetests
> storage.test_impl_mongodb:MeterTest.test_get_raw_events_by_both_times
> test_get_raw_events_by_both_times (storage.test_impl_mongodb.MeterTest)
> ... FAIL
>
> ======================================================================
> FAIL: test_get_raw_events_by_both_times
> (storage.test_impl_mongodb.MeterTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/opt/stack/ceilometer/tests/storage/test_impl_mongodb.py",
> line 364, in test_get_raw_events_by_both_times
>     assert length == 1
> AssertionError:
>     [] = list(self.conn.get_raw_events(<ceilometer.storage.EventFilter
> object at 0x2ca7f50>))
>     0 = len([])
> >>  assert 0 == 1
>     assert [][0]['timestamp'] == <module 'datetime' from
> '/usr/lib/python2.7/lib-dynload/datetime.so'>.<module 'datetime' from
> '/usr/lib/python2.7/lib-dynload/datetime.so'>(2012, 7, 2, 10, 42)
>
> -------------------- >> begin captured stdout << ---------------------
>
>
> QUERY:
> {'timestamp': {'$gte': datetime.datetime(2012, 7, 2, 10, 42), '$lt':
> datetime.datetime(2012, 7, 2, 10, 43)}}
>
>
> EVENTS:
> []
>
>
> ALL:
> 2012-07-02 10:43:00
> 2012-07-02 10:41:00
> 2012-07-02 10:40:00
> 2012-07-02 10:42:00
> 2012-07-02 10:41:00
>
> --------------------- >> end captured stdout << ----------------------
> -------------------- >> begin captured logging << --------------------
> ceilometer.storage.impl_mongodb: INFO: connecting to MongoDB on
> localhost:27017
> storage.test_impl_mongodb: DEBUG: Unable to connect to mongod, falling
> back to MIM
> --------------------- >> end captured logging << ---------------------
>
> ----------------------------------------------------------------------
> Ran 1 test in 0.073s
>
> FAILED (failures=1)
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20120918/eef6d46e/attachment.html>


More information about the OpenStack-dev mailing list