Reviewed: https://review.openstack.org/456550 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=ec03a576143562f2c917276c6aaeebcecdca5788 Submitter: Jenkins Branch: master
commit ec03a576143562f2c917276c6aaeebcecdca5788 Author: Kevin Benton <ke...@benton.pub> Date: Thu Apr 13 03:15:03 2017 -0700 Call expire_all in revision tests before re-use After the merge of Ia15c63f94d2c67791da3b65546e59f6929c8c685, delete port occurs in a separate session. So when an interface is deleted from a router, the router object that gets a revision bump is in a separate sqlalchemy session. This means that if the router object is loaded in a parent session, it will not see the updated revision number. This is fine for the normal code path since we don't return the revision number of the router after the port removal in the API. However, in the unit tests we keep re-using the same session for all of the operations so we can get a stale router in a get_router call after an interface removal if the router SQLA object is still in the identity map of the session. The transience of this failure was due to the fact that a stale read would only occur if the router SQLA object hadn't been garbage collected. This fix alters the unit tests to call expire_all() on the session being used whenver it is referenced if it's not in an active transaction. Change-Id: I5ba5c5773b85ed9a710e69d7e2f596f760b43fd3 Closes-Bug: #1679815 ** Changed in: neutron Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1679815 Title: test_router_interface_ops_bump_router fails with "AssertionError: 5 not greater than 5" Status in neutron: Fix Released Bug description: Traceback (most recent call last): File "/home/jenkins/workspace/gate-neutron-python35/neutron/tests/base.py", line 116, in func return f(self, *args, **kwargs) File "/home/jenkins/workspace/gate-neutron-python35/neutron/tests/unit/services/revisions/test_revision_plugin.py", line 162, in test_router_interface_ops_bump_router router['revision_number']) File "/home/jenkins/workspace/gate-neutron-python35/.tox/py35/lib/python3.5/site-packages/unittest2/case.py", line 1233, in assertGreater self.fail(self._formatMessage(msg, standardMsg)) File "/home/jenkins/workspace/gate-neutron-python35/.tox/py35/lib/python3.5/site-packages/unittest2/case.py", line 690, in fail raise self.failureException(msg) AssertionError: 5 not greater than 5 http://logs.openstack.org/88/360488/3/gate/gate-neutron- python35/1b33db5/testr_results.html.gz To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1679815/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp