From: armando-migliaccio Date: Fri, 24 Apr 2015 16:27:40 +0000 (-0700) Subject: Fix MismatchError to nondeterministic order for list of controllers X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=e6bd3ed9c86ff493b7087c99797bfd3fb473c3a7;p=openstack-build%2Fneutron-build.git 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 --- 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()