Skip to content

Commit

Permalink
Fix SnapshotStatusApisIT (#46563) (#46582)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
original-brownbear committed Sep 11, 2019
1 parent 31697c7 commit f8d5145
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ public void testStatusAPICallInProgressSnapshot() throws Exception {
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");
Expand Down

0 comments on commit f8d5145

Please sign in to comment.