On Travis, we check if Elasticsearch is up using:
wget can handle connection refused errors, but there's small window where ES is not fully up but can already respond with a 503 instead of a 200, which fails wget.
We should use the cluster health API to wait:
See also the article "Dealing with 503 errors when testing Elasticsearch integration in Rails".
How to test: Travis builds should pass consistently.