Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase retries for storage service #231

Merged
merged 1 commit into from
Oct 8, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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