unittest test_by_user_period() failed

Bug #1151345 reported by Lianhao Lu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Undecided
Doug Hellmann

Bug Description

Using the latest ceilometer master, with commit id:54432375ac8cfb0f58bd974ca05a44e5101bb536,

when running "tox -e py27-folsom,py27", sometimes the unittest case test_by_user_period fails with the following output:

======================================================================
FAIL: test_by_user_period (tests.storage.test_impl_mongodb.StatisticsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/stack/ceilometer/tests/storage/base.py", line 809, in test_by_user_period
    datetime.datetime(2012, 9, 25, 10, 28))
AssertionError: datetime.datetime(2012, 9, 25, 12, 28) != datetime.datetime(2012, 9, 25, 10, 28)
    'datetime.datetime(2012, 9, 25, 12, 28) != datetime.datetime(2012, 9, 25, 10, 28)' = '%s != %s' % (safe_repr(datetime.datetime(2012, 9, 25, 12, 28)), safe_repr(datetime.datetime(2012, 9, 25, 10, 28)))
    'datetime.datetime(2012, 9, 25, 12, 28) != datetime.datetime(2012, 9, 25, 10, 28)' = self._formatMessage('datetime.datetime(2012, 9, 25, 12, 28) != datetime.datetime(2012, 9, 25, 10, 28)', 'datetime.datetime(2012, 9, 25, 12, 28) != datetime.datetime(2012, 9, 25, 10, 28)')
>> raise self.failureException('datetime.datetime(2012, 9, 25, 12, 28) != datetime.datetime(2012, 9, 25, 10, 28)')

-------------------- >> begin captured logging << --------------------
ceilometer.storage.impl_mongodb: INFO: connecting to MongoDB on localhost:27017
ceilometer.storage.impl_test: DEBUG: Using MIM for test connection
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 630 tests in 9.134s

FAILED (failures=1)
ERROR: InvocationError: '/opt/stack/ceilometer/.tox/py27/bin/nosetests --no-path-adjustment'
____________________________________________________________________ summary ____________________________________________________________________
ERROR: py27-folsom: commands failed
ERROR: py27: commands failed

This error is not always reproducible. Sometimes it happens and sometimes it doesn't.

The problem looks like that the data returned by the query into Ming is not always in the same order as we expected in the patch https://review.openstack.org/23439.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/23797
Committed: http://github.com/openstack/ceilometer/commit/df0a2ca24be6229e29b7cb340f8286a54a726ebf
Submitter: Jenkins
Branch: master

commit df0a2ca24be6229e29b7cb340f8286a54a726ebf
Author: Lianhao Lu <email address hidden>
Date: Thu Mar 7 17:52:22 2013 +0800

    Fix oslo.config and unittest.

    Switch to the new oslo.config package which was renamed from
    oslo-config.

    Use python-keystoneclient master version as a temporary workaround for
    bug #1151665.

    Temporary workdaround of the bug #1151345 by comment out the test code
    to pass the jenkin's gate test.

    Change-Id: I7c223f3e98c5d33993b345d93c27f97d3d926d80

Changed in ceilometer:
status: New → Fix Committed
Revision history for this message
Lianhao Lu (lianhao-lu) wrote :

Patch https://review.openstack.org/23797 was only a workaround to unblock the jenkin's gate test jobs. Leave it open for real fixing.

Changed in ceilometer:
status: Fix Committed → Confirmed
Changed in ceilometer:
assignee: nobody → Doug Hellmann (doug-hellmann)
milestone: none → grizzly-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (master)

Fix proposed to branch: master
Review: https://review.openstack.org/23956

Changed in ceilometer:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/23956
Committed: http://github.com/openstack/ceilometer/commit/0bc53f78876916d066e5c4382e74518dfb201501
Submitter: Jenkins
Branch: master

commit 0bc53f78876916d066e5c4382e74518dfb201501
Author: Doug Hellmann <email address hidden>
Date: Thu Mar 7 11:53:20 2013 -0500

    Ensure the statistics are sorted

    Sort the statistics by the period start date before
    returning them, and restore the test that verifies
    this behavior.

    bug 1151345

    Change-Id: I4f05ea049b7609cea9dab947738b7aabf3f062ef
    Signed-off-by: Doug Hellmann <email address hidden>

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: grizzly-rc1 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.