remove testUnassignedShardAndEmptyNodesInRoutingTable
testUnassignedShardAndEmptyNodesInRoutingTable and that test is as old as time and does a very bogus thing. it is an IT test which extracts the GatewayAllocator from the node and tells it to allocated unassigned shards, while giving it a conjured cluster state with no nodes in it (it uses the DiscoveryNodes.EMPTY_NODES. This is never a cluster state we want to reroute on (we always have at least master node in it). I'm going to just delete the test as I don't think it adds much value. Closes #21463
This commit is contained in:
parent
dd77d7fd0a
commit
bca264699a
|
@ -93,24 +93,6 @@ public class RareClusterStateIT extends ESIntegTestCase {
|
|||
return 0;
|
||||
}
|
||||
|
||||
public void testUnassignedShardAndEmptyNodesInRoutingTable() throws Exception {
|
||||
internalCluster().startNode();
|
||||
createIndex("a");
|
||||
ensureSearchable("a");
|
||||
ClusterState current = clusterService().state();
|
||||
GatewayAllocator allocator = internalCluster().getInstance(GatewayAllocator.class);
|
||||
|
||||
AllocationDeciders allocationDeciders = new AllocationDeciders(Settings.EMPTY, Collections.emptyList());
|
||||
RoutingNodes routingNodes = new RoutingNodes(
|
||||
ClusterState.builder(current)
|
||||
.routingTable(RoutingTable.builder(current.routingTable()).remove("a").addAsRecovery(current.metaData().index("a")).build())
|
||||
.nodes(DiscoveryNodes.EMPTY_NODES)
|
||||
.build(), false
|
||||
);
|
||||
RoutingAllocation routingAllocation = new RoutingAllocation(allocationDeciders, routingNodes, current, ClusterInfo.EMPTY, System.nanoTime());
|
||||
allocator.allocateUnassigned(routingAllocation);
|
||||
}
|
||||
|
||||
public void testAssignmentWithJustAddedNodes() throws Exception {
|
||||
internalCluster().startNode();
|
||||
final String index = "index";
|
||||
|
|
Loading…
Reference in New Issue