|
26 | 26 | import org.elasticsearch.test.rest.ESRestTestCase; |
27 | 27 | import org.elasticsearch.xpack.core.ilm.AllocateAction; |
28 | 28 | import org.elasticsearch.xpack.core.ilm.DeleteAction; |
29 | | -import org.elasticsearch.xpack.core.ilm.ErrorStep; |
30 | 29 | import org.elasticsearch.xpack.core.ilm.ForceMergeAction; |
31 | 30 | import org.elasticsearch.xpack.core.ilm.FreezeAction; |
32 | 31 | import org.elasticsearch.xpack.core.ilm.LifecycleAction; |
|
40 | 39 | import org.elasticsearch.xpack.core.ilm.ShrinkStep; |
41 | 40 | import org.elasticsearch.xpack.core.ilm.Step.StepKey; |
42 | 41 | import org.elasticsearch.xpack.core.ilm.TerminalPolicyStep; |
43 | | -import org.elasticsearch.xpack.core.ilm.WaitForRolloverReadyStep; |
44 | 42 | import org.hamcrest.Matchers; |
45 | 43 | import org.junit.Before; |
46 | 44 |
|
@@ -290,40 +288,6 @@ public void testRolloverActionWithIndexingComplete() throws Exception { |
290 | 288 | assertBusy(() -> assertEquals("true", getOnlyIndexSettings(originalIndex).get(LifecycleSettings.LIFECYCLE_INDEXING_COMPLETE))); |
291 | 289 | } |
292 | 290 |
|
293 | | - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/49073") |
294 | | - public void testRolloverAlreadyExists() throws Exception { |
295 | | - String originalIndex = index + "-000001"; |
296 | | - String secondIndex = index + "-000002"; |
297 | | - createIndexWithSettings(originalIndex, Settings.builder().put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1) |
298 | | - .put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0) |
299 | | - .put(RolloverAction.LIFECYCLE_ROLLOVER_ALIAS, "alias") |
300 | | - ); |
301 | | - |
302 | | - // create policy |
303 | | - createNewSingletonPolicy("hot", new RolloverAction(null, null, 1L)); |
304 | | - // update policy on index |
305 | | - updatePolicy(originalIndex, policy); |
306 | | - // Manually create the new index |
307 | | - Request request = new Request("PUT", "/" + secondIndex); |
308 | | - request.setJsonEntity("{\n \"settings\": " + Strings.toString(Settings.builder().put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1) |
309 | | - .put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0).build()) + "}"); |
310 | | - client().performRequest(request); |
311 | | - // wait for the shards to initialize |
312 | | - ensureGreen(secondIndex); |
313 | | - // index another doc to trigger the policy |
314 | | - index(client(), originalIndex, "_id", "foo", "bar"); |
315 | | - assertBusy(() -> { |
316 | | - Map<String, Object> explainIndexResponse = explainIndex(originalIndex); |
317 | | - logger.info(originalIndex + ": " + getStepKey(explainIndexResponse)); |
318 | | - logger.info(secondIndex + ": " + getStepKeyForIndex(secondIndex)); |
319 | | - assertThat(getStepKey(explainIndexResponse), equalTo(new StepKey("hot", RolloverAction.NAME, ErrorStep.NAME))); |
320 | | - assertThat(explainIndexResponse.get("failed_step"), equalTo(WaitForRolloverReadyStep.NAME)); |
321 | | - @SuppressWarnings("unchecked") |
322 | | - String reason = ((Map<String, String>) explainIndexResponse.get("step_info")).get("reason"); |
323 | | - assertThat(reason, containsString("already exists")); |
324 | | - }); |
325 | | - } |
326 | | - |
327 | 291 | public void testAllocateOnlyAllocation() throws Exception { |
328 | 292 | createIndexWithSettings(index, Settings.builder().put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 2) |
329 | 293 | .put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0)); |
|
0 commit comments