Skip to content

Commit

Permalink
Fix flaky behavior of RemoteStoreRestoreIT.testRateLimitedRemoteDownl…
Browse files Browse the repository at this point in the history
…oads

Signed-off-by: Sachin Kale <kalsac@amazon.com>
  • Loading branch information
Sachin Kale committed Sep 7, 2023
1 parent e6a7202 commit 89b1d29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,8 @@ public void testRateLimitedRemoteDownloads() throws Exception {
}
assertThat(downloadPauseTime, greaterThan(TimeValue.timeValueSeconds(randomIntBetween(5, 10)).nanos()));
}, 30, TimeUnit.SECONDS);
ensureGreen(INDEX_NAME);
// Waiting for extended period for green state so that rate limit does not cause flakiness
ensureGreen(TimeValue.timeValueSeconds(120), INDEX_NAME);
// This is required to get updated number from already active shards which were not restored
assertEquals(shardCount, getNumShards(INDEX_NAME).totalNumShards);
assertEquals(0, getNumShards(INDEX_NAME).numReplicas);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ public ClusterMetadataManifest writeIncrementalMetadata(
* @param clusterState current ClusterState
* @param toUpload list of IndexMetadata to upload
* @return {@code List<UploadedIndexMetadata>} list of IndexMetadata uploaded to remote
* @throws IOException
*/
private List<UploadedIndexMetadata> writeIndexMetadataParallel(ClusterState clusterState, List<IndexMetadata> toUpload)
throws IOException {
Expand Down Expand Up @@ -322,7 +321,6 @@ private List<UploadedIndexMetadata> writeIndexMetadataParallel(ClusterState clus
* @param clusterState current ClusterState
* @param indexMetadata {@link IndexMetadata} to upload
* @param latchedActionListener listener to respond back on after upload finishes
* @throws IOException
*/
private void writeIndexMetadataAsync(
ClusterState clusterState,
Expand Down

0 comments on commit 89b1d29

Please sign in to comment.