We're updating the issue view to help you get more done. 

Use cluster health API to wait for Elasticsearch startup on Travis

Description

On Travis, we check if Elasticsearch is up using:

1 wget -q --waitretry=1 --retry-connrefused -T 20 -O - http://127.0.0.1:9400

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:

1 wget -q --waitretry=1 --retry-connrefused -T 20 -O - "http://127.0.0.1:9400/_cluster/health?wait_for_status=yellow"

See also the article "Dealing with 503 errors when testing Elasticsearch integration in Rails".

How to test: Travis builds should pass consistently.

Environment

Status

Assignee

redsummernight

Reporter

redsummernight

Roadmap

Misc

Priority

Medium

Affects versions

0.9.218

Fix versions

Components

AutomatedTests

Difficulty

Medium

Milestone

Internal 0.9