[TEST] Wait for yellow before verifying - sometimes the shard is not even started

This commit is contained in:
Simon Willnauer 2014-12-12 12:40:15 +01:00
parent b857a1f635
commit 42d9a57d0c
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ public class SearchWhileRelocatingTests extends ElasticsearchIntegrationTest {
threads[j].join();
}
// this might time out on some machines if they are really busy and you hit lots of throttling
ClusterHealthResponse resp = client().admin().cluster().prepareHealth().setWaitForRelocatingShards(0).setWaitForEvents(Priority.LANGUID).setTimeout("5m").get();
ClusterHealthResponse resp = client().admin().cluster().prepareHealth().setWaitForYellowStatus().setWaitForRelocatingShards(0).setWaitForEvents(Priority.LANGUID).setTimeout("5m").get();
assertNoTimeout(resp);
if (!thrownExceptions.isEmpty() || !nonCriticalExceptions.isEmpty()) {
Client client = client();