summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWeifan Fu <weifan.fu@bigswitch.com>2018-10-15 16:45:17 -0700
committerWeifan Fu <weifan.fu@bigswitch.com>2018-10-15 16:45:17 -0700
commit2b962d5fdf5994865e392749749913683f2105ab (patch)
tree505f518ec8f4598d91df3c48e5344ac29faa2b7a
parent28f4dab37b535f4ec852f0d161dc86e64949e3f4 (diff)
OSP-244 Fix inheritance issue for TestBigSwitchMechDriverNetworksV2
TestBigSwitchMechDriverNetworksV2 was inherited from two classes, both of them have a setUp() method, previously, TestNetworksV2's setUp() was called, while our setUp() was not called. This caused an issue that topo sync was still triggled and made test_create_network unstable. Changing the order of classes being inherited is easy but that would not be compatible with python3. Specifying the super class for setUp() is a more consistent fix. Change-Id: Ic01394b4875d1cbafd84d26f093ad56ccfd424ab
Notes
Notes (review): Code-Review+2: Aditya Vaja <wolverine.av@gmail.com> Workflow+1: Aditya Vaja <wolverine.av@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 16 Oct 2018 16:33:17 +0000 Reviewed-on: https://review.openstack.org/610754 Project: openstack/networking-bigswitch Branch: refs/heads/master
-rw-r--r--networking_bigswitch/tests/unit/ml2/drivers/test_bigswitch_mech.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/networking_bigswitch/tests/unit/ml2/drivers/test_bigswitch_mech.py b/networking_bigswitch/tests/unit/ml2/drivers/test_bigswitch_mech.py
index 933c90a..b5a405f 100644
--- a/networking_bigswitch/tests/unit/ml2/drivers/test_bigswitch_mech.py
+++ b/networking_bigswitch/tests/unit/ml2/drivers/test_bigswitch_mech.py
@@ -78,6 +78,12 @@ class TestBigSwitchMechDriverBase(trp.BigSwitchProxyPluginV2TestCase):
78 78
79class TestBigSwitchMechDriverNetworksV2(test_db_base_plugin_v2.TestNetworksV2, 79class TestBigSwitchMechDriverNetworksV2(test_db_base_plugin_v2.TestNetworksV2,
80 TestBigSwitchMechDriverBase): 80 TestBigSwitchMechDriverBase):
81 def setUp(self, plugin=None, service_plugins=None, ext_mgr=None):
82 TestBigSwitchMechDriverBase.setUp(self,
83 plugin=plugin,
84 service_plugins=service_plugins,
85 ext_mgr=ext_mgr)
86
81 def test_create_network(self): 87 def test_create_network(self):
82 name = 'net1' 88 name = 'net1'
83 keys = [('subnets', []), ('name', name), ('admin_state_up', True), 89 keys = [('subnets', []), ('name', name), ('admin_state_up', True),