From 30d00360c1917e8754c655e3524f68a57deaf07a Mon Sep 17 00:00:00 2001 From: Ajay Kannan Date: Thu, 8 Oct 2015 16:31:51 -0700 Subject: [PATCH] Increase retry parameters for storage --- .../google/gcloud/storage/testing/RemoteGcsHelper.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/testing/RemoteGcsHelper.java b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/testing/RemoteGcsHelper.java index e4d92b71a940..53353513a937 100644 --- a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/testing/RemoteGcsHelper.java +++ b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/testing/RemoteGcsHelper.java @@ -50,7 +50,6 @@ public class RemoteGcsHelper { private static final String BUCKET_NAME_PREFIX = "gcloud-test-bucket-temp-"; private static final String PROJECT_ID_ENV_VAR = "GCLOUD_TESTS_PROJECT_ID"; private static final String PRIVATE_KEY_ENV_VAR = "GCLOUD_TESTS_KEY"; - private final StorageOptions options; private RemoteGcsHelper(StorageOptions options) { @@ -127,7 +126,13 @@ public static RemoteGcsHelper create(String projectId, String keyPath, Option... StorageOptions storageOptions = StorageOptions.builder() .authCredentials(AuthCredentials.createForJson(keyFileStream)) .projectId(projectId) - .retryParams(RetryParams.getDefaultInstance()) + .retryParams(RetryParams.builder() + .retryMaxAttempts(10) + .retryMinAttempts(6) + .maxRetryDelayMillis(30000) + .totalRetryPeriodMillis(120000) + .initialRetryDelayMillis(250) + .build()) .build(); return new RemoteGcsHelper(storageOptions); } catch (FileNotFoundException ex) {