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
This commit is contained in:
parent
31697c71bd
commit
f8d5145472
|
@ -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> 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");
|
||||
|
|
Loading…
Reference in New Issue