diff --git a/server/src/main/java/org/elasticsearch/persistent/PersistentTasksCustomMetaData.java b/server/src/main/java/org/elasticsearch/persistent/PersistentTasksCustomMetaData.java index c827a09582f..f6ef778db07 100644 --- a/server/src/main/java/org/elasticsearch/persistent/PersistentTasksCustomMetaData.java +++ b/server/src/main/java/org/elasticsearch/persistent/PersistentTasksCustomMetaData.java @@ -406,14 +406,6 @@ public final class PersistentTasksCustomMetaData extends AbstractNamedDiffable future1 = new WaitForPersistentTaskStatusFuture<>(); persistentTasksService.waitForPersistentTaskStatus(taskId, - task -> task != null && task.isCurrentStatus() && task.getStatus().toString() != null && + task -> task != null && task.getStatus() != null && task.getStatus().toString() != null && task.getStatus().toString().equals("{\"phase\":\"phase " + (finalI + 1) + "\"}"), TimeValue.timeValueSeconds(10), future1); assertThat(future1.get().getId(), equalTo(taskId));