elasticsearch/elasticsearch — pull request #8789 by bleskes (2014-12-05 08:48:18+00:00)
Title: Gateway: GatewayService should register cluster state listener before checking for current state

At the moment we may miss a state change and fail to recover on time.

Exposed by build failure: http://build-us-00.elasticsearch.org/job/es_core_1x_suse/53/testReport/junit/org.elasticsearch.cluster/NoMasterNodeTests/testNoMasterActions_writeMasterBlock/