]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Force order of dhcp.needs_resync_reasons dictionary elements
authorCedric Brandily <zzelle@gmail.com>
Tue, 26 May 2015 13:14:11 +0000 (13:14 +0000)
committerCedric Brandily <zzelle@gmail.com>
Tue, 26 May 2015 13:40:42 +0000 (13:40 +0000)
commita1d679678daa560c86bb84303aee6163296ec653
tree0692c05513210ec086840f13290f3738c87772d0
parent2aa336aeb86b5ba4c2569f43242506813bf60e2d
Force order of dhcp.needs_resync_reasons dictionary elements

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

The test assumed that the dhcp.needs_resync_reasons dictionary from
neutron.agent.dhcp.agent had elements in a particular order. Found with
PYTHONHASHSEED=2.

The fix refactors the test case to force a sorted dhcp.needs_resync_reasons
dictionary.

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: Ia7fc2c3e605d92d8497d44e28054bdda613cebf2
neutron/tests/unit/agent/dhcp/test_agent.py