Sort _get_new/deleted_set_ips responses in unittests
This fixes the test_set_members_adding/deleting_less_than_5 unit test
that breaks with a randomized PYTHONHASHSEED (see the bug report).
The test assumed that the _get_new/deleted_set_ips from
neutron.agent.linux.ipset_manager return elements in a particular order.
Found with PYTHONHASHSEED=1.
The fix refactors the test case to force sorted responses from
_get_new/deleted_set_ips during unittests.
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.
Reviewed: https:/ /review. openstack. org/185633 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=77303fbeaa0 60bcee2befad65d ccb457fbb6ab65
Committed: https:/
Submitter: Jenkins
Branch: master
commit 77303fbeaa060bc ee2befad65dccb4 57fbb6ab65
Author: Cedric Brandily <email address hidden>
Date: Tue May 26 14:38:26 2015 +0000
Sort _get_new/ deleted_ set_ips responses in unittests
This fixes the test_set_ members_ adding/ deleting_ less_than_ 5 unit test
that breaks with a randomized PYTHONHASHSEED (see the bug report).
The test assumed that the _get_new/ deleted_ set_ips from agent.linux. ipset_manager return elements in a particular order.
neutron.
Found with PYTHONHASHSEED=1.
The fix refactors the test case to force sorted responses from new/deleted_ set_ips during unittests.
_get_
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: I8408365825ec1e 97a83c2181f38ec 1f9468df91e