Skip to content

Commit

Permalink
Minor refactor
Browse files Browse the repository at this point in the history
Inline forceMergeActionWithCodec in place of its only caller.
  • Loading branch information
joegallo committed Oct 28, 2020
1 parent 4c40a1a commit fe5c390
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ public void testReadOnly() throws Exception {
});
}

public void forceMergeActionWithCodec(String codec) throws Exception {
public void testForceMergeAction() throws Exception {
createIndexWithSettings(client(), index, alias, Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1)
.put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0));
for (int i = 0; i < randomIntBetween(2, 10); i++) {
Expand All @@ -540,7 +540,7 @@ public void forceMergeActionWithCodec(String codec) throws Exception {
}

assertThat(getNumberOfSegments(client(), index), greaterThan(1));
createNewSingletonPolicy(client(), policy, "warm", new ForceMergeAction(1, codec));
createNewSingletonPolicy(client(), policy, "warm", new ForceMergeAction(1, null));
updatePolicy(index, policy);

assertBusy(() -> {
Expand All @@ -552,10 +552,6 @@ public void forceMergeActionWithCodec(String codec) throws Exception {
expectThrows(ResponseException.class, () -> indexDocument(client(), index));
}

public void testForceMergeAction() throws Exception {
forceMergeActionWithCodec(null);
}

public void testShrinkAction() throws Exception {
int numShards = 4;
int divisor = randomFrom(2, 4);
Expand Down

0 comments on commit fe5c390

Please sign in to comment.