diff --git a/x-pack/plugin/ilm/qa/multi-node/src/test/java/org/elasticsearch/xpack/ilm/TimeSeriesLifecycleActionsIT.java b/x-pack/plugin/ilm/qa/multi-node/src/test/java/org/elasticsearch/xpack/ilm/TimeSeriesLifecycleActionsIT.java index 2340bb4c7b0bf..169b613f22a2b 100644 --- a/x-pack/plugin/ilm/qa/multi-node/src/test/java/org/elasticsearch/xpack/ilm/TimeSeriesLifecycleActionsIT.java +++ b/x-pack/plugin/ilm/qa/multi-node/src/test/java/org/elasticsearch/xpack/ilm/TimeSeriesLifecycleActionsIT.java @@ -26,7 +26,6 @@ import org.elasticsearch.test.rest.ESRestTestCase; import org.elasticsearch.xpack.core.ilm.AllocateAction; import org.elasticsearch.xpack.core.ilm.DeleteAction; -import org.elasticsearch.xpack.core.ilm.ErrorStep; import org.elasticsearch.xpack.core.ilm.ForceMergeAction; import org.elasticsearch.xpack.core.ilm.FreezeAction; import org.elasticsearch.xpack.core.ilm.LifecycleAction; @@ -40,7 +39,6 @@ import org.elasticsearch.xpack.core.ilm.ShrinkStep; import org.elasticsearch.xpack.core.ilm.Step.StepKey; import org.elasticsearch.xpack.core.ilm.TerminalPolicyStep; -import org.elasticsearch.xpack.core.ilm.WaitForRolloverReadyStep; import org.hamcrest.Matchers; import org.junit.Before; @@ -290,39 +288,6 @@ public void testRolloverActionWithIndexingComplete() throws Exception { assertBusy(() -> assertEquals("true", getOnlyIndexSettings(originalIndex).get(LifecycleSettings.LIFECYCLE_INDEXING_COMPLETE))); } - public void testRolloverAlreadyExists() throws Exception { - String originalIndex = index + "-000001"; - String secondIndex = index + "-000002"; - createIndexWithSettings(originalIndex, Settings.builder().put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1) - .put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0) - .put(RolloverAction.LIFECYCLE_ROLLOVER_ALIAS, "alias") - ); - - // create policy - createNewSingletonPolicy("hot", new RolloverAction(null, null, 1L)); - // update policy on index - updatePolicy(originalIndex, policy); - // Manually create the new index - Request request = new Request("PUT", "/" + secondIndex); - request.setJsonEntity("{\n \"settings\": " + Strings.toString(Settings.builder().put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1) - .put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0).build()) + "}"); - client().performRequest(request); - // wait for the shards to initialize - ensureGreen(secondIndex); - // index another doc to trigger the policy - index(client(), originalIndex, "_id", "foo", "bar"); - assertBusy(() -> { - Map explainIndexResponse = explainIndex(originalIndex); - logger.info(originalIndex + ": " + getStepKey(explainIndexResponse)); - logger.info(secondIndex + ": " + getStepKeyForIndex(secondIndex)); - assertThat(getStepKey(explainIndexResponse), equalTo(new StepKey("hot", RolloverAction.NAME, ErrorStep.NAME))); - assertThat(explainIndexResponse.get("failed_step"), equalTo(WaitForRolloverReadyStep.NAME)); - @SuppressWarnings("unchecked") - String reason = ((Map) explainIndexResponse.get("step_info")).get("reason"); - assertThat(reason, containsString("already exists")); - }); - } - public void testAllocateOnlyAllocation() throws Exception { createIndexWithSettings(index, Settings.builder().put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 2) .put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0));