diff --git a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardsAvailabilityHealthIndicatorServiceTests.java b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardsAvailabilityHealthIndicatorServiceTests.java index 69e5f6333fd12..0d7880ab68393 100644 --- a/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardsAvailabilityHealthIndicatorServiceTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardsAvailabilityHealthIndicatorServiceTests.java @@ -317,9 +317,14 @@ public void testShouldBeRedWhenThereAreUnassignedPrimariesAndUnassignedReplicas( public void testAllReplicasUnassigned() { { ClusterState clusterState = createClusterStateWith( - List.of(index("myindex", new ShardAllocation(randomNodeId(), AVAILABLE), - new ShardAllocation(randomNodeId(), AVAILABLE), - new ShardAllocation(randomNodeId(), AVAILABLE))), + List.of( + index( + "myindex", + new ShardAllocation(randomNodeId(), AVAILABLE), + new ShardAllocation(randomNodeId(), AVAILABLE), + new ShardAllocation(randomNodeId(), AVAILABLE) + ) + ), List.of() ); var service = createShardsAvailabilityIndicatorService(clusterState); @@ -334,9 +339,14 @@ public void testAllReplicasUnassigned() { } { ClusterState clusterState = createClusterStateWith( - List.of(index("myindex", new ShardAllocation(randomNodeId(), AVAILABLE), - new ShardAllocation(randomNodeId(), randomFrom(UNAVAILABLE, INITIALIZING)), - new ShardAllocation(randomNodeId(), AVAILABLE))), + List.of( + index( + "myindex", + new ShardAllocation(randomNodeId(), AVAILABLE), + new ShardAllocation(randomNodeId(), randomFrom(UNAVAILABLE, INITIALIZING)), + new ShardAllocation(randomNodeId(), AVAILABLE) + ) + ), List.of() ); var service = createShardsAvailabilityIndicatorService(clusterState); @@ -351,9 +361,14 @@ public void testAllReplicasUnassigned() { } { ClusterState clusterState = createClusterStateWith( - List.of(index("myindex", new ShardAllocation(randomNodeId(), AVAILABLE), - new ShardAllocation(randomNodeId(), randomFrom(UNAVAILABLE, INITIALIZING)), - new ShardAllocation(randomNodeId(), randomFrom(UNAVAILABLE, INITIALIZING)))), + List.of( + index( + "myindex", + new ShardAllocation(randomNodeId(), AVAILABLE), + new ShardAllocation(randomNodeId(), randomFrom(UNAVAILABLE, INITIALIZING)), + new ShardAllocation(randomNodeId(), randomFrom(UNAVAILABLE, INITIALIZING)) + ) + ), List.of() ); var service = createShardsAvailabilityIndicatorService(clusterState);