Closed Bug 1127798 Opened 11 years ago Closed 7 years ago

Kuma test suite depends on dict order

Categories

(developer.mozilla.org Graveyard :: Code Cleanup, defect)

All
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jezdez, Assigned: anthony)

Details

(Whiteboard: [specification][type:bug])

What did you do? ================ I ran the kuma test suite with a random PYTHONHASHSEED environment variable. What happened? ============== When running the kuma test suite with a random PYTHONHASHSEED environment variable it raises lots of errors. That env var was added to Python to counteract a potential DoS attach against its hash implementation. The tox test runner uses a random value to enforce random hash values to be prepared for that. See https://travis-ci.org/mozilla/kuma/jobs/48800730 for an example error list. What should have happened? ========================== Make tests not rely on a fixed dict order. Is there anything else we should know? ======================================
Component: General → Code Cleanup
Commit pushed to master at https://github.com/mozilla/kuma https://github.com/mozilla/kuma/commit/dbb0d94343c44b6c29176f6eedbd167fb63c3d24 bug 1127798: Add build with random PYTHONHASHSEED Add a build (allowed to fail) that tests Kuma with a random PYTHONHASHSEED.
Commits pushed to master at https://github.com/mozilla/kuma https://github.com/mozilla/kuma/commit/eda0e0d064b8694fde78f8c502904e7f8edbe990 bug 1127798: Remove randomness in the tests The tests were depending on the variable PYTHONHASHSEED being set to 0 to disable the Random Number Generator to ensure that all elements coming from any data structure were ordered. This behavior was different from the production environment and is no longer necessary. - Refactor the code to remove check based on order or to sort the information pre-checking. - Adapt travis configuration to no longer test with PYTHONHASHSEED at 0 https://github.com/mozilla/kuma/commit/f23a1a78613a158c9dfbbaf37e32fc51e4f2143a Merge pull request #4851 from MatonAnthony/randomseed-1127798 Bug 1127798: Kuma test suite depends on dict order
The test suite no longer relies on a fixed dictionary key order. Thanks Anthony!
Assignee: nobody → me
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
<3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.