<br><br><div class="gmail_quote">On Mon, Sep 17, 2012 at 6:39 PM, John Tran <span dir="ltr"><<a href="mailto:njhtran@gmail.com" target="_blank">njhtran@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
When I use CEILOMETER_LIVE_TEST=1, all tests pass just fine but just<br>
so darn slow in comparison to the MIM tests.  Therefore, I'm trying to<br>
figure out what my problem is, maybe someone knows the answer.   Here<br>
is one of the tests traceback but I've added some custom print stubs<br>
to help troubleshoot.<br></blockquote><div><br></div><div>Are you using the version of Ming from <a href="https://github.com/dreamhost/Ming">https://github.com/dreamhost/Ming</a>? 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.</div>
<div><br></div><div>Doug</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I've stubbed 'QUERY' to see what the filter is.   It's showing a<br>
filter expression to get any raw events $gte (2012, 7, 2, 10, 42) &&<br>
$lt (2012, 7, 2, 10, 43).<br>
<br>
The results (stubbed 'EVENTS') are coming back empty, although the<br>
expected result should have 1 meter object.<br>
<br>
The stubbed 'ALL' is a list of timestamps for ALL meter objects and<br>
clearly I see one that has a timestamp of 2012-07-02 10:42:00, which<br>
should be EQUAL to the $gte argument.<br>
<br>
$ ./run_tests.sh<br>
storage.test_impl_mongodb:MeterTest.test_get_raw_events_by_both_times<br>
+ rm -rf cover<br>
+ [ ! -z  ]<br>
+ nosetests storage.test_impl_mongodb:MeterTest.test_get_raw_events_by_both_times<br>
test_get_raw_events_by_both_times (storage.test_impl_mongodb.MeterTest) ... FAIL<br>
<br>
======================================================================<br>
FAIL: test_get_raw_events_by_both_times (storage.test_impl_mongodb.MeterTest)<br>
----------------------------------------------------------------------<br>
Traceback (most recent call last):<br>
  File "/opt/stack/ceilometer/tests/storage/test_impl_mongodb.py",<br>
line 364, in test_get_raw_events_by_both_times<br>
    assert length == 1<br>
AssertionError:<br>
    [] = list(self.conn.get_raw_events(<ceilometer.storage.EventFilter<br>
object at 0x2ca7f50>))<br>
    0 = len([])<br>
>>  assert 0 == 1<br>
    assert [][0]['timestamp'] == <module 'datetime' from<br>
'/usr/lib/python2.7/lib-dynload/datetime.so'>.<module 'datetime' from<br>
'/usr/lib/python2.7/lib-dynload/datetime.so'>(2012, 7, 2, 10, 42)<br>
<br>
-------------------- >> begin captured stdout << ---------------------<br>
<br>
<br>
QUERY:<br>
{'timestamp': {'$gte': datetime.datetime(2012, 7, 2, 10, 42), '$lt':<br>
datetime.datetime(2012, 7, 2, 10, 43)}}<br>
<br>
<br>
EVENTS:<br>
[]<br>
<br>
<br>
ALL:<br>
2012-07-02 10:43:00<br>
2012-07-02 10:41:00<br>
2012-07-02 10:40:00<br>
2012-07-02 10:42:00<br>
2012-07-02 10:41:00<br>
<br>
--------------------- >> end captured stdout << ----------------------<br>
-------------------- >> begin captured logging << --------------------<br>
ceilometer.storage.impl_mongodb: INFO: connecting to MongoDB on localhost:27017<br>
storage.test_impl_mongodb: DEBUG: Unable to connect to mongod, falling<br>
back to MIM<br>
--------------------- >> end captured logging << ---------------------<br>
<br>
----------------------------------------------------------------------<br>
Ran 1 test in 0.073s<br>
<br>
FAILED (failures=1)<br>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div><br>