From: YAMAMOTO Takashi Date: Wed, 8 Apr 2015 08:29:10 +0000 (+0900) Subject: l2pop UT: Expire cached db objects before reusing a session X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=a6af531339c870bdc330f3343c91dce3e6757c3e;p=openstack-build%2Fneutron-build.git l2pop UT: Expire cached db objects before reusing a session Partial-Bug: #1441488 Change-Id: Ic22ae49d99b52e9f650ea0ed638842e7c91831af --- diff --git a/neutron/tests/unit/plugins/ml2/drivers/l2pop/test_mech_driver.py b/neutron/tests/unit/plugins/ml2/drivers/l2pop/test_mech_driver.py index 06a9b26c6..bbfe282d0 100644 --- a/neutron/tests/unit/plugins/ml2/drivers/l2pop/test_mech_driver.py +++ b/neutron/tests/unit/plugins/ml2/drivers/l2pop/test_mech_driver.py @@ -828,6 +828,8 @@ class TestL2PopulationRpcTestCase(test_plugin.Ml2PluginV2TestCase): self.assertEqual(res['port']['binding:host_id'], L2_AGENT_2['host']) self.mock_fanout.reset_mock() + # NOTE(yamamoto): see bug #1441488 + self.adminContext.session.expire_all() self.callbacks.get_device_details( self.adminContext, device=device1, @@ -883,6 +885,8 @@ class TestL2PopulationRpcTestCase(test_plugin.Ml2PluginV2TestCase): self.assertEqual(res['port']['binding:host_id'], L2_AGENT_4['host']) self.mock_fanout.reset_mock() + # NOTE(yamamoto): see bug #1441488 + self.adminContext.session.expire_all() self.callbacks.get_device_details( self.adminContext, device=device1,