diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/RestoreSnapshotIT.java b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/RestoreSnapshotIT.java index 07a2d7a1fe3..b0705528f40 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/RestoreSnapshotIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/RestoreSnapshotIT.java @@ -526,10 +526,8 @@ public class RestoreSnapshotIT extends AbstractSnapshotIntegTestCase { client.admin().cluster().prepareUpdateSettings().setTransientSettings(Settings.builder() .putNull(INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING.getKey()).build()).get(); - // check that restore now completes quickly (i.e. within 10 seconds) - assertBusy(() -> assertTrue(restoreSnapshotResponse.isDone())); - - assertThat(restoreSnapshotResponse.get().getRestoreInfo().totalShards(), greaterThan(0)); + // check that restore now completes quickly (i.e. within 20 seconds) + assertThat(restoreSnapshotResponse.get(20L, TimeUnit.SECONDS).getRestoreInfo().totalShards(), greaterThan(0)); assertDocCount("test-idx", 100L); }