diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/CopyExecutionStateStep.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/CopyExecutionStateStep.java index ffaf02b1513d3..74df72ebfe6a8 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/CopyExecutionStateStep.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/CopyExecutionStateStep.java @@ -78,7 +78,6 @@ public ClusterState performAction(Index index, ClusterState clusterState) { String phase = targetNextStepKey.getPhase(); String action = targetNextStepKey.getAction(); String step = targetNextStepKey.getName(); - long lifecycleDate = lifecycleState.getLifecycleDate(); LifecycleExecutionState.Builder relevantTargetCustomData = LifecycleExecutionState.builder(lifecycleState); // Override the phase, action, and step for the target next StepKey diff --git a/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java b/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java index 6566a7f44ec08..e0ac87ddbfff0 100644 --- a/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java +++ b/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java @@ -453,6 +453,11 @@ public void testConvertingSearchableSnapshotFromFullToPartial() throws Exception Request hitCount = new Request("GET", "/" + searchableSnapMountedIndexName + "/_count"); Map count = entityAsMap(client().performRequest(hitCount)); assertThat("expected a single document but got: " + count, (int) count.get("count"), equalTo(1)); + + assertBusy(() -> assertTrue( + "Expecting the mounted index to be deleted and to be converted to an alias", + aliasExists(searchableSnapMountedIndexName, SearchableSnapshotAction.FULL_RESTORED_INDEX_PREFIX + index)) + ); } public void testSecondSearchableSnapshotUsingDifferentRepoThrows() throws Exception {