Skip to content

Commit

Permalink
Merge pull request #231 from ajkannan/increase-storage-retries
Browse files Browse the repository at this point in the history
Increase retries for storage service
  • Loading branch information
aozarov committed Oct 8, 2015
2 parents a1059d8 + 30d0036 commit ad64788
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit ad64788

Please sign in to comment.