Skip to content

Commit

Permalink
Fix spotless check
Browse files Browse the repository at this point in the history
Signed-off-by: Arpit Bandejiya <[email protected]>
  • Loading branch information
Arpit-Bandejiya committed Mar 19, 2024
1 parent 3d4d865 commit d7657af
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ private Settings.Builder getSettingsBuilderForPrimaryBalance() {
private Settings.Builder getSettingsBuilderForPrimaryReBalance() {
return getSettingsBuilderForPrimaryBalance(true, true);
}

private Settings.Builder getSettingsBuilderForPrimaryBalance(boolean preferPrimaryBalance, boolean preferPrimaryRebalance) {
final float indexBalance = 0.55f;
final float shardBalance = 0.45f;
Expand Down Expand Up @@ -207,7 +208,7 @@ public void testPrimaryBalanceWithoutPreferPrimaryBalanceSetting() {
int balanceFailed = 0;

AllocationService strategy = createAllocationService(
getSettingsBuilderForPrimaryBalance(false ,false).build(),
getSettingsBuilderForPrimaryBalance(false, false).build(),
new TestGatewayAllocator()
);
for (int i = 0; i < numberOfRuns; i++) {
Expand Down Expand Up @@ -400,8 +401,7 @@ public void testPrimaryBalanceWithContrainstBreaching() {
*/
public void testGlobalPrimaryBalance() throws Exception {
AllocationService strategy = createAllocationService(getSettingsBuilderForPrimaryBalance().build(), new TestGatewayAllocator());
ClusterState clusterState = ClusterState.builder(CLUSTER_NAME_SETTING.getDefault(Settings.EMPTY))
.build();
ClusterState clusterState = ClusterState.builder(CLUSTER_NAME_SETTING.getDefault(Settings.EMPTY)).build();
clusterState = addNode(clusterState, strategy);
clusterState = addNode(clusterState, strategy);

Expand All @@ -420,8 +420,7 @@ public void testGlobalPrimaryBalance() throws Exception {
public void testGlobalPrimaryBalanceWithNodeDrops() throws Exception {
final float buffer = 0.05f;
AllocationService strategy = createAllocationService(getSettingsBuilderForPrimaryBalance().build(), new TestGatewayAllocator());
ClusterState clusterState = ClusterState.builder(CLUSTER_NAME_SETTING.getDefault(Settings.EMPTY))
.build();
ClusterState clusterState = ClusterState.builder(CLUSTER_NAME_SETTING.getDefault(Settings.EMPTY)).build();
clusterState = addNode(clusterState, strategy);
clusterState = addNode(clusterState, strategy);
clusterState = addNode(clusterState, strategy);
Expand Down

0 comments on commit d7657af

Please sign in to comment.