]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Do not assume order of device_ids set elements
authorBradley Jones <jones.bradley@me.com>
Wed, 6 Aug 2014 13:16:23 +0000 (14:16 +0100)
committerBradley Jones <jones.bradley@me.com>
Thu, 18 Sep 2014 23:38:52 +0000 (23:38 +0000)
commit979d8118577c59a2dfe8c3ebd268fb3863aa4b26
tree75db0d9c9fa716d37ec49e19c361d3f6f54f2713
parent52dede814d87d3654297b5fcdcfe97539e388233
Do not assume order of device_ids set elements

This fixes the test_ancillary_bridges_multiple unit test that breaks with a randomized
PYTHONHASHSEED (see the bug report).
The test assumed that the device_ids set had
elements in a particular order. Found with PYTHONHASHSEED=2455351445.

The fix refactors the pullup_side_effect function so that it checks if the
device_id exists before returning the bridge.

Partial-bug: #1348818

Note: There are several other unrelated unit tests that also break with a
randomized PYTHONHASHSEED, but they are not addressed here. They will be
addressed in separate patches.

Change-Id: Ie6b44d1d820ebb186036ffcd04ea2104dd384e94
neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py