|
27 | 27 | import org.elasticsearch.test.rest.ESRestTestCase;
|
28 | 28 | import org.elasticsearch.xpack.core.ilm.AllocateAction;
|
29 | 29 | import org.elasticsearch.xpack.core.ilm.DeleteAction;
|
| 30 | +import org.elasticsearch.xpack.core.ilm.ErrorStep; |
30 | 31 | import org.elasticsearch.xpack.core.ilm.ForceMergeAction;
|
31 | 32 | import org.elasticsearch.xpack.core.ilm.FreezeAction;
|
32 | 33 | import org.elasticsearch.xpack.core.ilm.LifecycleAction;
|
@@ -1103,6 +1104,8 @@ public void testHistoryIsWrittenWithSuccess() throws Exception {
|
1103 | 1104 | Request refreshIndex = new Request("POST", "/" + index + "-1/_refresh");
|
1104 | 1105 | client().performRequest(refreshIndex);
|
1105 | 1106 |
|
| 1107 | + assertBusy(() -> assertThat(getStepKeyForIndex(index + "-1"), equalTo(TerminalPolicyStep.KEY))); |
| 1108 | + |
1106 | 1109 | assertBusy(() -> assertHistoryIsPresent(policy, index + "-1", true, "wait-for-indexing-complete"), 30, TimeUnit.SECONDS);
|
1107 | 1110 | assertBusy(() -> assertHistoryIsPresent(policy, index + "-1", true, "wait-for-follow-shard-tasks"), 30, TimeUnit.SECONDS);
|
1108 | 1111 | assertBusy(() -> assertHistoryIsPresent(policy, index + "-1", true, "pause-follower-index"), 30, TimeUnit.SECONDS);
|
@@ -1145,6 +1148,8 @@ public void testHistoryIsWrittenWithFailure() throws Exception {
|
1145 | 1148 | Request refreshIndex = new Request("POST", "/" + index + "-1/_refresh");
|
1146 | 1149 | client().performRequest(refreshIndex);
|
1147 | 1150 |
|
| 1151 | + assertBusy(() -> assertThat(getStepKeyForIndex(index + "-1").getName(), equalTo(ErrorStep.NAME))); |
| 1152 | + |
1148 | 1153 | assertBusy(() -> assertHistoryIsPresent(policy, index + "-1", false, "ERROR"), 30, TimeUnit.SECONDS);
|
1149 | 1154 | }
|
1150 | 1155 |
|
|
0 commit comments