]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Do not assume order of new_peers list elements
authorJohn Davidge <jodavidg@cisco.com>
Tue, 5 Aug 2014 14:13:03 +0000 (15:13 +0100)
committerJohn Davidge <jodavidg@cisco.com>
Tue, 12 Aug 2014 09:57:25 +0000 (10:57 +0100)
commitc353a26fb36b97bdc369bd41e0f23a8bbf2a2ea8
tree2eb48be4116265bbd513e3e95c93db000f2f530a
parent4b3547c28c244f70803de9dc47d767f80b7ec2dc
Do not assume order of new_peers list elements

This fixes the vpn unit test that breaks with a randomized PYTHONHASHSEED
(see the bug report).

The test assumed that the new_peers list from self.new_update_request had
elements in a particular order. Found with PYTHONHASHSEED=2455351445.

The fix refactors the test case to handle an unsorted new_peers list by
sorting it before running the test.

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: I86e7f84cedbdc8e1d7404363a560fd759d264c49
neutron/tests/unit/db/vpn/test_db_vpnaas.py