From e6bd3ed9c86ff493b7087c99797bfd3fb473c3a7 Mon Sep 17 00:00:00 2001 From: armando-migliaccio Date: Fri, 24 Apr 2015 09:27:40 -0700 Subject: [PATCH] Fix MismatchError to nondeterministic order for list of controllers The list of controllers returned by the ovsdb server can be in any order, therefore we can't assert likes for likes. Assert the sorted lists instead. Change-Id: Ice3bb8cc0b3da70f8c9aae50d8cdae2b474ff49b Closes-bug: #1448202 --- neutron/tests/functional/agent/test_ovs_lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron/tests/functional/agent/test_ovs_lib.py b/neutron/tests/functional/agent/test_ovs_lib.py index f59584f12..69589a564 100644 --- a/neutron/tests/functional/agent/test_ovs_lib.py +++ b/neutron/tests/functional/agent/test_ovs_lib.py @@ -240,7 +240,7 @@ class OVSBridgeTestCase(OVSBridgeTestBase): def _set_controllers_connection_mode(self, controllers): self.br.set_controller(controllers) - self.assertEqual(controllers, self.br.get_controller()) + self.assertEqual(sorted(controllers), sorted(self.br.get_controller())) self.br.set_controllers_connection_mode('out-of-band') self._assert_controllers_connection_mode('out-of-band') self.br.del_controller() -- 2.45.2