diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorker.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorker.java index 44673207ba..52373596ce 100644 --- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorker.java +++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorker.java @@ -590,7 +590,7 @@ private void maybeWaitForInflightQuota() { @VisibleForTesting static long calculateSleepTimeMilli(long retryCount) { - return Math.min((long) Math.pow(2, retryCount), 60000); + return (long) Math.min(Math.pow(2, retryCount) * 50, 60000); } @VisibleForTesting diff --git a/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerTest.java b/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerTest.java index 3acf7d1349..71e4d47673 100644 --- a/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerTest.java +++ b/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerTest.java @@ -518,8 +518,8 @@ public void testStreamNameMismatch() throws Exception { @Test public void testExponentialBackoff() throws Exception { - assertThat(ConnectionWorker.calculateSleepTimeMilli(0)).isEqualTo(1); - assertThat(ConnectionWorker.calculateSleepTimeMilli(5)).isEqualTo(32); + assertThat(ConnectionWorker.calculateSleepTimeMilli(0)).isEqualTo(50); + assertThat(ConnectionWorker.calculateSleepTimeMilli(5)).isEqualTo(1600); assertThat(ConnectionWorker.calculateSleepTimeMilli(100)).isEqualTo(60000); }