notification test failure in gate

Bug #1327344 reported by gordon chung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Medium
Lianhao Lu

Bug Description

most likely related to bug 1321826. creating a new bug instance to help with elastic recheck:

2014-05-29 15:17:19.442 | ======================================================================
2014-05-29 15:17:19.442 | FAIL: tests.test_notification.TestRealNotification.test_notification_service
2014-05-29 15:17:19.442 | tags: worker-5
2014-05-29 15:17:19.442 | ----------------------------------------------------------------------
2014-05-29 15:17:19.442 | Empty attachments:
2014-05-29 15:17:19.442 | stderr
2014-05-29 15:17:19.443 | stdout
2014-05-29 15:17:19.443 |
2014-05-29 15:17:19.443 | Traceback (most recent call last):
2014-05-29 15:17:19.443 | File "/home/jenkins/workspace/gate-ceilometer-python26/.tox/py26/lib/python2.6/site-packages/mock.py", line 1201, in patched
2014-05-29 15:17:19.443 | return func(*args, **keywargs)
2014-05-29 15:17:19.444 | File "/home/jenkins/workspace/gate-ceilometer-python26/ceilometer/tests/test_notification.py", line 217, in test_notification_service
2014-05-29 15:17:19.444 | mock.call(mock.ANY, SamplesMatcher()),
2014-05-29 15:17:19.448 | File "/home/jenkins/workspace/gate-ceilometer-python26/.tox/py26/lib/python2.6/site-packages/mock.py", line 863, in assert_has_calls
2014-05-29 15:17:19.448 | 'Actual: %r' % (calls, self.mock_calls)
2014-05-29 15:17:19.448 | AssertionError: Calls not found.
2014-05-29 15:17:19.449 | Expected: [call(<ANY>, <tests.test_notification.SamplesMatcher object at 0x7692e50>), call(<ANY>, <tests.test_notification.SamplesMatcher object at 0x7692250>), call(<ANY>, <tests.test_notification.SamplesMatcher object at 0x76924d0>), call(<ANY>, <tests.test_notification.SamplesMatcher object at 0x7692110>), call(<ANY>, <tests.test_notification.SamplesMatcher object at 0x7692990>)]
2014-05-29 15:17:19.449 | Actual: [call(<ceilometer.openstack.common.context.RequestContext object at 0x7692bd0>, [<ceilometer.sample.Sample object at 0x7692850>])]

gordon chung (chungg)
Changed in ceilometer:
status: New → Triaged
importance: Undecided → Medium
Matt Riedemann (mriedem)
tags: added: gate-failure testing
Revision history for this message
Anita Kuno (anteaya) wrote :

e-r query patch located here: https://review.openstack.org/#/c/98535/

Revision history for this message
Lianhao Lu (lianhao-lu) wrote :

This happens because the side effect set in the tests.test_notification.TestRealNotification.test_notification_service triggers the main test case to check the result even before all the notification listeners finishes processing the notification.

Changed in ceilometer:
assignee: nobody → Lianhao Lu (lianhao-lu)
milestone: none → juno-1
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/98953

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/98953
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=c12274ca2dfd270919608001e5bc5ab55ccfde55
Submitter: Jenkins
Branch: master

commit c12274ca2dfd270919608001e5bc5ab55ccfde55
Author: Lianhao Lu <email address hidden>
Date: Tue Jun 10 13:15:52 2014 +0800

    Fixed unit test TestRealNotification

    The way how the unit test
    test_notification.TestRealNotification.test_notification_service was
    constructed would sometimes let the main test case check the result even
    before all the expected notification listeners finish processing. This
    would cause failure in gate test.

    We should make sure the test case check the result after all the
    expected listeners finish processing the notification.

    Change-Id: I5333d83365fc39264b1002030494556f90319312
    Closes-Bug: #1327344

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: juno-1 → 2014.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.