[TEST] Make sure all shards are allocated before killing a random data node.
This commit is contained in:
parent
403ebc9e07
commit
47326adb67
|
@ -21,6 +21,7 @@ package org.elasticsearch.cluster;
|
|||
|
||||
import org.elasticsearch.action.ActionRequestBuilder;
|
||||
import com.google.common.base.Predicate;
|
||||
import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse;
|
||||
import org.elasticsearch.action.bulk.BulkRequestBuilder;
|
||||
import org.elasticsearch.action.count.CountResponse;
|
||||
import org.elasticsearch.action.get.GetResponse;
|
||||
|
@ -225,6 +226,11 @@ public class NoMasterNodeTests extends ElasticsearchIntegrationTest {
|
|||
client().prepareIndex("test2", "type1", "1").setSource("field", "value1").get();
|
||||
refresh();
|
||||
|
||||
ensureSearchable("test1", "test2");
|
||||
|
||||
ClusterStateResponse clusterState = client().admin().cluster().prepareState().get();
|
||||
logger.info("Cluster state:\n" + clusterState.getState().prettyPrint());
|
||||
|
||||
internalCluster().stopRandomDataNode();
|
||||
assertThat(awaitBusy(new Predicate<Object>() {
|
||||
public boolean apply(Object o) {
|
||||
|
|
Loading…
Reference in New Issue