From a8dbab23a5ce74051ea3b0d1633b1d0505e0cd14 Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Tue, 6 Oct 2020 15:27:05 +0200 Subject: [PATCH] Increase Timeout in testDynamicRestoreThrottling (#63300) (#63324) Even if we increase the limit it might not take effect straight away if a thread is blocked on a long wait in `org.elasticsearch.index.snapshots.blobstore.RateLimitingInputStream#maybePause`. Let's increase the limit a little and see if that deals with the remaining failures for good and stop burning cycles busy asserting a future completion. Closes #63246 --- .../java/org/elasticsearch/snapshots/RestoreSnapshotIT.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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); }