Skip to content

Commit

Permalink
[7.x] Fix TimeSeriesLifecycleActionsIT.testAllocateOnlyAllocation (#6…
Browse files Browse the repository at this point in the history
…9563) (#69612)

This loosens the restriction on the node(s) that are allowed, and gives the test more time for the
shard to move to the expected node and then into the phase complete step.

Resolves #69340
  • Loading branch information
dakrone authored Feb 25, 2021
1 parent 81d9c05 commit c9a89bc
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,16 @@ public void testRetryFreezeDeleteAction() throws Exception {
}


@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/69340")
public void testAllocateOnlyAllocation() throws Exception {
createIndexWithSettings(client(), index, alias, Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 2)
.put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0));
String allocateNodeName = "javaRestTest-" + randomFrom(0, 1);
AllocateAction allocateAction = new AllocateAction(null, null, null, singletonMap("_name", allocateNodeName));
String allocateNodeName = "javaRestTest-0,javaRestTest-1,javaRestTest-2,javaRestTest-3";
AllocateAction allocateAction = new AllocateAction(null, singletonMap("_name", allocateNodeName), null, null);
String endPhase = randomFrom("warm", "cold");
createNewSingletonPolicy(client(), policy, endPhase, allocateAction);
updatePolicy(client(), index, policy);
assertBusy(() -> assertThat(getStepKeyForIndex(client(), index), equalTo(PhaseCompleteStep.finalStep(endPhase).getKey())));
assertBusy(() -> assertThat(getStepKeyForIndex(client(), index), equalTo(PhaseCompleteStep.finalStep(endPhase).getKey())),
30, TimeUnit.SECONDS);
ensureGreen(index);
}

Expand Down

0 comments on commit c9a89bc

Please sign in to comment.