This fixes the unit tests[1] that breaks with a randomized
PYTHONHASHSEED (see the bug report).
The test assumed that the security_group_rules_for_devices method from
neutron.agent.securitygroups_rpc returned security group rules in a
particular order. Found with PYTHONHASHSEED=2.
The fix refactors the test case to handle unsorted security group rules.
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.
Reviewed: https:/ /review. openstack. org/186122 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=36a1d14b580 28d0294e6778612 9a2a09ce393cde
Committed: https:/
Submitter: Jenkins
Branch: master
commit 36a1d14b58028d0 294e67786129a2a 09ce393cde
Author: Cedric Brandily <email address hidden>
Date: Wed May 27 20:30:28 2015 +0200
Do not assume order of security group rules
This fixes the unit tests[1] that breaks with a randomized
PYTHONHASHSEED (see the bug report).
The test assumed that the security_ group_rules_ for_devices method from agent.securityg roups_rpc returned security group rules in a
neutron.
particular order. Found with PYTHONHASHSEED=2.
The fix refactors the test case to handle unsorted security group rules.
[1] neutron. tests.unit. plugins. ml2.test_ security_ group.\
TestMl2SGServe rRpcCallBack. \
test_security_ group_rules_ for_devices_ ipv4_ingress_ addr_pair
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: I1b2bd4100c1900 4f12822c414aefc 86aae9849db