Skip to content

Commit d7446ea

Browse files
committed
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
1 parent c3cae1f commit d7446ea

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

server/src/test/java/org/elasticsearch/indices/state/RareClusterStateIT.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,6 @@ protected int numberOfReplicas() {
9393
return 0;
9494
}
9595

96-
public void testUnassignedShardAndEmptyNodesInRoutingTable() throws Exception {
97-
internalCluster().startNode();
98-
createIndex("a");
99-
ensureSearchable("a");
100-
ClusterState current = clusterService().state();
101-
GatewayAllocator allocator = internalCluster().getInstance(GatewayAllocator.class);
102-
103-
AllocationDeciders allocationDeciders = new AllocationDeciders(Settings.EMPTY, Collections.emptyList());
104-
RoutingNodes routingNodes = new RoutingNodes(
105-
ClusterState.builder(current)
106-
.routingTable(RoutingTable.builder(current.routingTable()).remove("a").addAsRecovery(current.metaData().index("a")).build())
107-
.nodes(DiscoveryNodes.EMPTY_NODES)
108-
.build(), false
109-
);
110-
RoutingAllocation routingAllocation = new RoutingAllocation(allocationDeciders, routingNodes, current, ClusterInfo.EMPTY, System.nanoTime());
111-
allocator.allocateUnassigned(routingAllocation);
112-
}
113-
11496
public void testAssignmentWithJustAddedNodes() throws Exception {
11597
internalCluster().startNode();
11698
final String index = "index";

0 commit comments

Comments
 (0)