Skip to content

Commit 356beb5

Browse files
committed
Fix tests
1 parent 542c256 commit 356beb5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

server/src/main/java/org/elasticsearch/cluster/ClusterInfo.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ public String toString() {
322322

323323
// exposed for tests, computed here rather than exposing all the collections separately
324324
int getChunkCount() {
325-
return leastAvailableSpaceUsage.size() + shardSizes.size() + shardDataSetSizes.size() + dataPath.size() + reservedSpace.size() + 6;
325+
return leastAvailableSpaceUsage.size() + shardSizes.size() + shardDataSetSizes.size() + dataPath.size() + reservedSpace.size()
326+
+ nodesHeapUsage.size() + 7;
326327
}
327328

328329
public record NodeAndShard(String nodeId, ShardId shardId) implements Writeable {

server/src/test/java/org/elasticsearch/action/admin/cluster/allocation/DesiredBalanceResponseTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ public void testToXContent() throws IOException {
337337
Map<String, Object> clusterInfo = (Map<String, Object>) json.get("cluster_info");
338338
assertThat(
339339
clusterInfo.keySet(),
340-
containsInAnyOrder("nodes", "shard_paths", "shard_sizes", "shard_data_set_sizes", "reserved_sizes")
340+
containsInAnyOrder("nodes", "shard_paths", "shard_sizes", "shard_data_set_sizes", "reserved_sizes", "heap_usage")
341341
);
342342
}
343343

0 commit comments

Comments
 (0)