TestCollectorService.test_extract_when : assertAlmostEqual() failure

Bug #1230099 reported by Mark McLoughlin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
High
Julien Danjou

Bug Description

Looks like https://review.openstack.org/47857 introduced an occasional unit test failure:

 FAIL: tests.collector.test_service.TestCollectorService.test_extract_when
 tags: worker-1
  ----------------------------------------------------------------------
  Empty attachments:
    pythonlogging:''

  Traceback (most recent call last):
    File "tests/collector/test_service.py", line 301, in test_extract_when
      self.assertAlmostEqual(timeutils.delta_seconds(modified, when), 0.0)
    File "/usr/lib/python2.7/unittest/case.py", line 559, in assertAlmostEqual
      raise self.failureException(msg)
  AssertionError: -1e-06 != 0.0 within 7 places

http://logs.openstack.org/38/48138/2/gate/gate-ceilometer-python27/9e4a41d/console.html

Revision history for this message
Julien Danjou (jdanjou) wrote :

It's actually the same bug that the commit was trying to fix, but written differently. :-)

(for reference it's https://bugs.launchpad.net/ceilometer/+bug/1223346)

Changed in ceilometer:
assignee: nobody → Julien Danjou (jdanjou)
importance: Undecided → Medium
status: New → Triaged
importance: Medium → High
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/48199

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

Reviewed: https://review.openstack.org/48199
Committed: http://github.com/openstack/ceilometer/commit/23ae798cee7ec40d6d674318267aa27593b760df
Submitter: Jenkins
Branch: master

commit 23ae798cee7ec40d6d674318267aa27593b760df
Author: Julien Danjou <email address hidden>
Date: Wed Sep 25 10:32:46 2013 +0200

    tests: fix places check for timestamp equality

    It's actually up to the microsecond, and not finer, so the default
    places value of 7 isn't good enough.

    Change-Id: Ic0438db4c9039a904a43547d5c5181400a84d22f
    Closes-Bug: #1230099

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: none → havana-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: havana-rc1 → 2013.2
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.