Skip to content

Commit

Permalink
pollInterval for snapshot creation
Browse files Browse the repository at this point in the history
Signed-off-by: Maciej Mierzwa <[email protected]>
  • Loading branch information
MaciejMierzwa committed Nov 8, 2023
1 parent dc9c171 commit 14a4487
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public CreateSnapshotResponse createSnapshot(String repositoryName, String snaps

public void waitForSnapshotCreation(String repositoryName, String snapshotName) {
GetSnapshotsRequest getSnapshotsRequest = new GetSnapshotsRequest(repositoryName, new String[] { snapshotName });
Awaitility.await().pollDelay(10, TimeUnit.MICROSECONDS).pollInterval(1, TimeUnit.SECONDS).alias("wait for snapshot creation").ignoreExceptions().until(() -> {
Awaitility.await().pollDelay(250, TimeUnit.MILLISECONDS).pollInterval(2, TimeUnit.SECONDS).alias("wait for snapshot creation").ignoreExceptions().until(() -> {
GetSnapshotsResponse snapshotsResponse = snapshotClient.get(getSnapshotsRequest, DEFAULT);
SnapshotInfo snapshotInfo = snapshotsResponse.getSnapshots().get(0);
return SnapshotState.SUCCESS.equals(snapshotInfo.state());
Expand Down

0 comments on commit 14a4487

Please sign in to comment.