Skip to content

Commit add23cf

Browse files
committed
fixed ClusterStatsIT tests
Signed-off-by: Vinay Krishna Pudyodu <[email protected]>
1 parent 8c97c47 commit add23cf

File tree

1 file changed

+9
-7
lines changed
  • server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/stats

1 file changed

+9
-7
lines changed

server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/stats/ClusterStatsIT.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ private void waitForNodes(int numNodes) {
9090
public void testNodeCounts() {
9191
int total = 1;
9292
internalCluster().startNode();
93-
Map<String, Integer> expectedCounts = getExpectedCounts(1, 1, 1, 1, 1, 0, 0);
93+
Map<String, Integer> expectedCounts = getExpectedCounts(1, 1, 1, 1, 1, 0, 0, 0);
9494
int numNodes = randomIntBetween(1, 5);
9595

9696
ClusterStatsResponse response = client().admin()
@@ -159,7 +159,7 @@ public void testNodeCountsWithDeprecatedMasterRole() throws ExecutionException,
159159
internalCluster().startNode(settings);
160160
waitForNodes(total);
161161

162-
Map<String, Integer> expectedCounts = getExpectedCounts(0, 1, 1, 0, 0, 0, 0);
162+
Map<String, Integer> expectedCounts = getExpectedCounts(0, 1, 1, 0, 0, 0, 0, 0);
163163

164164
Client client = client();
165165
ClusterStatsResponse response = client.admin()
@@ -484,7 +484,7 @@ public void testNodeRolesWithMasterLegacySettings() throws ExecutionException, I
484484
internalCluster().startNodes(legacyMasterSettings);
485485
waitForNodes(total);
486486

487-
Map<String, Integer> expectedCounts = getExpectedCounts(0, 1, 1, 0, 1, 0, 0);
487+
Map<String, Integer> expectedCounts = getExpectedCounts(0, 1, 1, 0, 1, 0, 0, 0);
488488

489489
Client client = client();
490490
ClusterStatsResponse clusterStatsResponse = client.admin()
@@ -518,7 +518,7 @@ public void testNodeRolesWithClusterManagerRole() throws ExecutionException, Int
518518
internalCluster().startNodes(clusterManagerNodeRoleSettings);
519519
waitForNodes(total);
520520

521-
Map<String, Integer> expectedCounts = getExpectedCounts(0, 1, 1, 0, 1, 0, 0);
521+
Map<String, Integer> expectedCounts = getExpectedCounts(0, 1, 1, 0, 1, 0, 0, 0);
522522

523523
Client client = client();
524524
ClusterStatsResponse clusterStatsResponse = client.admin()
@@ -546,7 +546,7 @@ public void testNodeRolesWithSeedDataNodeLegacySettings() throws ExecutionExcept
546546
internalCluster().startNodes(legacySeedDataNodeSettings);
547547
waitForNodes(total);
548548

549-
Map<String, Integer> expectedRoleCounts = getExpectedCounts(1, 1, 1, 0, 1, 0, 0);
549+
Map<String, Integer> expectedRoleCounts = getExpectedCounts(1, 1, 1, 0, 1, 0, 0, 0);
550550

551551
Client client = client();
552552
ClusterStatsResponse clusterStatsResponse = client.admin()
@@ -577,7 +577,7 @@ public void testNodeRolesWithDataNodeLegacySettings() throws ExecutionException,
577577
internalCluster().startNodes(legacyDataNodeSettings);
578578
waitForNodes(total);
579579

580-
Map<String, Integer> expectedRoleCounts = getExpectedCounts(1, 1, 1, 0, 1, 0, 0);
580+
Map<String, Integer> expectedRoleCounts = getExpectedCounts(1, 1, 1, 0, 1, 0, 0, 0);
581581

582582
Client client = client();
583583
ClusterStatsResponse clusterStatsResponse = client.admin()
@@ -887,6 +887,7 @@ private Map<String, Integer> getExpectedCounts(
887887
int clusterManagerRoleCount,
888888
int ingestRoleCount,
889889
int remoteClusterClientRoleCount,
890+
int warmRoleCount,
890891
int searchRoleCount,
891892
int coordinatingOnlyCount
892893
) {
@@ -896,7 +897,8 @@ private Map<String, Integer> getExpectedCounts(
896897
expectedCounts.put(DiscoveryNodeRole.CLUSTER_MANAGER_ROLE.roleName(), clusterManagerRoleCount);
897898
expectedCounts.put(DiscoveryNodeRole.INGEST_ROLE.roleName(), ingestRoleCount);
898899
expectedCounts.put(DiscoveryNodeRole.REMOTE_CLUSTER_CLIENT_ROLE.roleName(), remoteClusterClientRoleCount);
899-
expectedCounts.put(DiscoveryNodeRole.WARM_ROLE.roleName(), searchRoleCount);
900+
expectedCounts.put(DiscoveryNodeRole.WARM_ROLE.roleName(), warmRoleCount);
901+
expectedCounts.put(DiscoveryNodeRole.SEARCH_ROLE.roleName(), warmRoleCount);
900902
expectedCounts.put(ClusterStatsNodes.Counts.COORDINATING_ONLY, coordinatingOnlyCount);
901903
return expectedCounts;
902904
}

0 commit comments

Comments
 (0)