diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/ConcurrentSnapshotsIT.java b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/ConcurrentSnapshotsIT.java index 48231cd10c92d..00bac57b9238c 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/ConcurrentSnapshotsIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/ConcurrentSnapshotsIT.java @@ -22,7 +22,6 @@ import org.elasticsearch.action.support.GroupedActionListener; import org.elasticsearch.action.support.PlainActionFuture; import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.SnapshotDeletionsInProgress; import org.elasticsearch.cluster.SnapshotsInProgress; import org.elasticsearch.common.Strings; @@ -499,14 +498,8 @@ public void testMasterFailOverWithQueuedDeletes() throws Exception { expectThrows(SnapshotException.class, snapshotThreeFuture::actionGet); logger.info("--> verify that all snapshots are gone and no more work is left in the cluster state"); - assertBusy(() -> { - assertThat(client().admin().cluster().prepareGetSnapshots(repoName).get().getSnapshots(), empty()); - final ClusterState state = clusterService().state(); - final SnapshotsInProgress snapshotsInProgress = state.custom(SnapshotsInProgress.TYPE); - assertThat(snapshotsInProgress.entries(), empty()); - final SnapshotDeletionsInProgress snapshotDeletionsInProgress = state.custom(SnapshotDeletionsInProgress.TYPE); - assertThat(snapshotDeletionsInProgress.getEntries(), empty()); - }, 30L, TimeUnit.SECONDS); + awaitNoMoreRunningOperations(); + assertThat(client().admin().cluster().prepareGetSnapshots(repoName).get().getSnapshots(), empty()); } public void testAssertMultipleSnapshotsAndPrimaryFailOver() throws Exception {