From f8d5145472411160dfa8b26d7bcd33f1598edc16 Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Wed, 11 Sep 2019 11:58:42 +0200 Subject: [PATCH] Fix SnapshotStatusApisIT (#46563) (#46582) Obviously we have to run the status request again to busy wait for the `STARTED` state, just busy waiting on an existing response won't do anything. Closes #45917 --- .../org/elasticsearch/snapshots/SnapshotStatusApisIT.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/snapshots/SnapshotStatusApisIT.java b/server/src/test/java/org/elasticsearch/snapshots/SnapshotStatusApisIT.java index cbc4d8b0026..7d82e0514d1 100644 --- a/server/src/test/java/org/elasticsearch/snapshots/SnapshotStatusApisIT.java +++ b/server/src/test/java/org/elasticsearch/snapshots/SnapshotStatusApisIT.java @@ -99,9 +99,9 @@ public class SnapshotStatusApisIT extends AbstractSnapshotIntegTestCase { logger.info("--> wait for data nodes to get blocked"); waitForBlockOnAnyDataNode("test-repo", TimeValue.timeValueMinutes(1)); - final List snapshotStatus = client.admin().cluster().snapshotsStatus( - new SnapshotsStatusRequest("test-repo", new String[]{"test-snap"})).actionGet().getSnapshots(); - assertBusy(() -> assertEquals(SnapshotsInProgress.State.STARTED, snapshotStatus.get(0).getState()), 1L, TimeUnit.MINUTES); + assertBusy(() -> assertEquals(SnapshotsInProgress.State.STARTED, client.admin().cluster().snapshotsStatus( + new SnapshotsStatusRequest("test-repo", new String[]{"test-snap"})).actionGet().getSnapshots().get(0).getState()), 1L, + TimeUnit.MINUTES); logger.info("--> unblock all data nodes"); unblockAllDataNodes("test-repo");