testcase fail due to value is not match

Bug #1520850 reported by Dave Chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Dave Chen

Bug Description

The testcase fail occasionally, since the value got from DB or cache is not always match with the sequence of when the value is created.

2015-11-25 22:03:50.819 | Captured traceback:
2015-11-25 22:03:50.819 | ~~~~~~~~~~~~~~~~~~~
2015-11-25 22:03:50.819 | Traceback (most recent call last):
2015-11-25 22:03:50.819 | File "keystone/tests/unit/core.py", line 205, in inner
2015-11-25 22:03:50.819 | return f(*args, **kwargs)
2015-11-25 22:03:50.819 | File "keystone/tests/unit/test_associate_project_endpoint_extension.py", line 319, in test_create_endpoint_project_association_invalidates_cache
2015-11-25 22:03:50.820 | self.assertEqual(self.endpoint_id, catalog[0]['endpoints'][0]['id'])
2015-11-25 22:03:50.820 | File "/home/jenkins/workspace/gate-keystone-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 350, in assertEqual
2015-11-25 22:03:50.820 | self.assertThat(observed, matcher, message)
2015-11-25 22:03:50.820 | File "/home/jenkins/workspace/gate-keystone-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
2015-11-25 22:03:50.820 | raise mismatch_error
2015-11-25 22:03:50.820 | testtools.matchers._impl.MismatchError: '4ab46d1c529448e0a83818993e6355d2' != u'76b8e0d840c6480a89200cd10dac3de3'

Dave Chen (wei-d-chen)
Changed in python-openstackclient:
status: New → Invalid
affects: python-openstackclient → keystone
Changed in keystone:
status: Invalid → New
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Changed in keystone:
assignee: nobody → Dave Chen (wei-d-chen)
status: New → In Progress
Revision history for this message
Boris Bobrov (bbobrov) wrote :

Could you please post the full trace?

Revision history for this message
Dave Chen (wei-d-chen) wrote :

sure, pls see the updated stack trace.

description: updated
Changed in keystone:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/251060
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=b324e1ed972c6bfd4c3e2cc8bc0072c7ff0309fe
Submitter: Jenkins
Branch: master

commit b324e1ed972c6bfd4c3e2cc8bc0072c7ff0309fe
Author: Dave Chen <email address hidden>
Date: Sun Nov 29 00:13:07 2015 +0000

    Needn't care about the sequence for cache validation

    The testcases were added to check cache invalidation [1] but fail
    occasionally with the assertion where ordered sequence specific
    comparison is required, this is because the value fetched from DB
    or cache not always match with the sequence of when the value was
    created.

    Update the testcases to use unordered sequence specific comparison.

    [1] https://review.openstack.org/#/c/245633/

    Change-Id: Iffa3ccaa1b0a6627c34dc8902c507ce741442cc0
    Closes-Bug: #1520850

Changed in keystone:
status: In Progress → Fix Committed
Changed in keystone:
milestone: none → mitaka-1
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/keystone 9.0.0.0b1

This issue was fixed in the openstack/keystone 9.0.0.0b1 development milestone.

Changed in keystone:
status: Fix Committed → Fix Released
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.