[TEST] filter out unassigned shards

This commit is contained in:
Simon Willnauer 2015-02-26 14:12:03 +01:00
parent 46461c7730
commit b3be23ea11

View File

@ -101,7 +101,8 @@ public class AckClusterUpdateSettingsTests extends ElasticsearchIntegrationTest
for (IndexRoutingTable indexRoutingTable : clusterState.routingTable()) {
for (IndexShardRoutingTable indexShardRoutingTable : indexRoutingTable) {
for (ShardRouting shardRouting : indexShardRoutingTable) {
if (clusterState.nodes().get(shardRouting.currentNodeId()).id().equals(excludedNodeId)) {
assert clusterState.nodes() != null;
if (shardRouting.unassigned() == false && clusterState.nodes().get(shardRouting.currentNodeId()).id().equals(excludedNodeId)) {
//if the shard is still there it must be relocating and all nodes need to know, since the request was acknowledged
//reroute happens as part of the update settings and we made sure no throttling comes into the picture via settings
assertThat(shardRouting.relocating(), equalTo(true));