Skip to content

Commit bc9ca04

Browse files
committed
chore: Use GCA retry settings code suggestion
1 parent 6b834c9 commit bc9ca04

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/testing/RemoteBigQueryHelper.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,22 +146,22 @@ public static RemoteBigQueryHelper create(BigQueryOptions.Builder bigqueryOption
146146
// Opt to keep these settings a small as possible to minimize the total test time.
147147
// These values can be adjusted per test case, but these serve as default values.
148148
private static RetrySettings retrySettings() {
149-
double multiplier = 1.5;
149+
double backoffMultiplier = 1.5;
150150
int maxAttempts = 10;
151151
long initialRetryDelayMs = 100L; // 0.1s initial retry delay
152152
long maxRetryDelayMs = 1000L; // 1s max retry delay between retry
153153
long initialRpcTimeoutMs = 1000L; // 1s initial rpc duration
154154
long maxRpcTimeoutMs = 2000L; // 2s max rpc duration
155-
long totalTimeOut = 3000L; // 3s total timeout
155+
long totalTimeoutMs = 3000L; // 3s total timeout
156156
return RetrySettings.newBuilder()
157157
.setMaxAttempts(maxAttempts)
158-
.setTotalTimeoutDuration(Duration.ofMillis(totalTimeOut))
158+
.setTotalTimeoutDuration(Duration.ofMillis(totalTimeoutMs))
159159
.setInitialRetryDelayDuration(Duration.ofMillis(initialRetryDelayMs))
160160
.setMaxRetryDelayDuration(Duration.ofMillis(maxRetryDelayMs))
161-
.setRetryDelayMultiplier(multiplier)
161+
.setRetryDelayMultiplier(backoffMultiplier)
162162
.setInitialRpcTimeoutDuration(Duration.ofMillis(initialRpcTimeoutMs))
163163
.setMaxRpcTimeoutDuration(Duration.ofMillis(maxRpcTimeoutMs))
164-
.setRpcTimeoutMultiplier(multiplier)
164+
.setRpcTimeoutMultiplier(backoffMultiplier)
165165
.build();
166166
}
167167

0 commit comments

Comments
 (0)