Reviewed: https://review.openstack.org/187230 Committed: https://git.openstack.org/cgit/openstack/neutron-fwaas/commit/?id=0660c0518ebc349fa678ddcb56255577ff7d57cc Submitter: Jenkins Branch: master
commit 0660c0518ebc349fa678ddcb56255577ff7d57cc Author: Cedric Brandily <email address hidden> Date: Mon Jun 1 15:19:59 2015 +0000
Do not assume jsonutils.dumps ordering
This fixes the unit tests[1] that breaks with a randomized PYTHONHASHSEED (see the bug report).
The test assumed that the oslo_serializarion.jsonutils.dumps performs dictionary json dump in particular order. Found with PYTHONHASHSEED=1.
The fix refactors the test case by disabling json dumps and comparing dictionnaries instead of their json dumps.
[1] neutron_fwaas.tests.unit.services.firewall.drivers.mcafee.\ test_ngfw_fwaas: NGFWFwaasTestCase.test_create_firewall NGFWFwaasTestCase.test_update_firewall
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: I67fe1ab69bcfd99c2e778963b97c0d6b4b039802
Reviewed: https:/ /review. openstack. org/187230 /git.openstack. org/cgit/ openstack/ neutron- fwaas/commit/ ?id=0660c0518eb c349fa678ddcb56 255577ff7d57cc
Committed: https:/
Submitter: Jenkins
Branch: master
commit 0660c0518ebc349 fa678ddcb562555 77ff7d57cc
Author: Cedric Brandily <email address hidden>
Date: Mon Jun 1 15:19:59 2015 +0000
Do not assume jsonutils.dumps ordering
This fixes the unit tests[1] that breaks with a randomized
PYTHONHASHSEED (see the bug report).
The test assumed that the oslo_serializar ion.jsonutils. dumps performs
dictionary json dump in particular order. Found with PYTHONHASHSEED=1.
The fix refactors the test case by disabling json dumps and comparing
dictionnaries instead of their json dumps.
[1] neutron_ fwaas.tests. unit.services. firewall. drivers. mcafee. \
test_ngfw_ fwaas: TestCase. test_create_ firewall TestCase. test_update_ firewall
NGFWFwaas
NGFWFwaas
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: I67fe1ab69bcfd9 9c2e778963b97c0 d6b4b039802