.setWaitForYellowStatus()
.setWaitForNodes("2")
.execute().actionGet();</BUG>
assertThat(error.get(), nullValue());
closeNode("node2");
<BUG>client.admin().cluster().prepareHealth()

.setWaitForEvents(Priority.LANGUID)
.setWaitForYellowStatus()
.setWaitForNodes("1")
.execute().actionGet();</BUG>
assertThat(error.get(), nullValue());

.setWaitForYellowStatus()
.setWaitForActiveShards(4) // 2 nodes, so 4 shards (2 primaries, 2 replicas)
.execute().actionGet();
assertThat(error.get(), nullValue());
closeNode("node2");
client.admin().cluster().prepareHealth("test")
.setWaitForEvents(Priority.LANGUID)
.setTimeout(TimeValue.timeValueMinutes(2))
.setWaitForYellowStatus()
.setWaitForActiveShards(2) // 1 node, so 2 shards (2 primaries, 0 replicas)
.execute().actionGet();
assertThat(error.get(), nullValue());
