|  | 
| 44 | 44 | import org.opensearch.cluster.ClusterState; | 
| 45 | 45 | import org.opensearch.cluster.metadata.IndexMetadata; | 
| 46 | 46 | import org.opensearch.cluster.metadata.Metadata; | 
|  | 47 | +import org.opensearch.cluster.routing.RoutingPool; | 
| 47 | 48 | import org.opensearch.common.Priority; | 
| 48 | 49 | import org.opensearch.common.network.NetworkModule; | 
| 49 | 50 | import org.opensearch.common.settings.Settings; | 
| @@ -855,40 +856,38 @@ private void verifyException(int dataNodes, ShardCounts counts, IllegalArgumentE | 
| 855 | 856 |         int totalShards = counts.getFailingIndexShards() * (1 + counts.getFailingIndexReplicas()); | 
| 856 | 857 |         int currentShards = counts.getFirstIndexShards() * (1 + counts.getFirstIndexReplicas()); | 
| 857 | 858 |         int maxShards = counts.getShardsPerNode() * dataNodes; | 
| 858 |  | -        String shardType = getShardType(); | 
| 859 | 859 |         String expectedError = "Validation Failed: 1: this action would add [" | 
| 860 | 860 |             + totalShards | 
| 861 | 861 |             + "] total " | 
| 862 |  | -            + shardType | 
|  | 862 | +            + getShardType() | 
| 863 | 863 |             + " shards, but this cluster currently has [" | 
| 864 | 864 |             + currentShards | 
| 865 | 865 |             + "]/[" | 
| 866 | 866 |             + maxShards | 
| 867 | 867 |             + "] maximum " | 
| 868 |  | -            + shardType | 
|  | 868 | +            + getShardType() | 
| 869 | 869 |             + " shards open;"; | 
| 870 | 870 |         assertEquals(expectedError, e.getMessage()); | 
| 871 | 871 |     } | 
| 872 | 872 | 
 | 
| 873 | 873 |     private void verifyException(int maxShards, int currentShards, int extraShards, IllegalArgumentException e) { | 
| 874 |  | -        String shardType = getShardType(); | 
| 875 | 874 |         String expectedError = "Validation Failed: 1: this action would add [" | 
| 876 | 875 |             + extraShards | 
| 877 | 876 |             + "] total " | 
| 878 |  | -            + shardType | 
|  | 877 | +            + getShardType() | 
| 879 | 878 |             + " shards, but this cluster currently has [" | 
| 880 | 879 |             + currentShards | 
| 881 | 880 |             + "]/[" | 
| 882 | 881 |             + maxShards | 
| 883 | 882 |             + "] maximum " | 
| 884 |  | -            + shardType | 
|  | 883 | +            + getShardType() | 
| 885 | 884 |             + " shards open;"; | 
| 886 | 885 |         assertEquals(expectedError, e.getMessage()); | 
| 887 | 886 |     } | 
| 888 | 887 | 
 | 
| 889 |  | -    private String getShardType() { | 
|  | 888 | +    private RoutingPool getShardType() { | 
| 890 | 889 |         Boolean isWarmIndex = WRITABLE_WARM_INDEX_SETTING.get(settings); | 
| 891 |  | -        return isWarmIndex ? "Warm" : "Hot"; | 
|  | 890 | +        return isWarmIndex ? RoutingPool.REMOTE_CAPABLE : RoutingPool.LOCAL_ONLY; | 
| 892 | 891 |     } | 
| 893 | 892 | 
 | 
| 894 | 893 |     private Settings warmNodeSettings(ByteSizeValue cacheSize) { | 
|  | 
0 commit comments