theonion / django-bulbs

DEPRECATED: This project is now part of the Mono Repo (https://github.com/theonion/omni)
MIT License
26 stars 7 forks source link

Fix occasional ES 503 test errors #141

Closed mparent61 closed 8 years ago

mparent61 commented 8 years ago

Caused by accessing ES indices before shard allocation completed. Seems most apparent in test cases that don't call a "refresh" on search objects, like token auth tests.

Reference: http://stackoverflow.com/a/30311714

Sample Error: https://travis-ci.org/theonion/django-bulbs/jobs/115362885

Was able to recreate + verify fix locally. Travis builds seem fixed too.

Also threw in some lint fixes (see comments).

mparent61 commented 8 years ago

Also applies some lint + PY2/PY3 best practices

mparent61 commented 8 years ago

@benghaziboy @MichaelButkovic @collin

MichaelButkovic commented 8 years ago

:+1: very nice