From 83f0df18fdb0a3ce9851fa929eb385d0404912ee Mon Sep 17 00:00:00 2001 From: Derek Yau Date: Mon, 4 Nov 2024 11:55:02 -0500 Subject: [PATCH] Use only java.time.Duration in BuiltinMetricsTracerTest --- .../data/v2/stub/metrics/BuiltinMetricsTracerTest.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java index a5affdf1d7..0494295791 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java @@ -215,18 +215,16 @@ public void sendHeaders(Metadata headers) { .retrySettings() .setInitialRetryDelayDuration(java.time.Duration.ofMillis(200)); - java.time.Duration timeout = java.time.Duration.ofMillis(6000); - java.time.Duration backOffTime = java.time.Duration.ofMillis(10); stubSettingsBuilder .readRowsSettings() .retrySettings() .setTotalTimeoutDuration(Duration.ofMillis(9000)) - .setMaxRpcTimeout(org.threeten.bp.Duration.parse(timeout.toString())) + .setMaxRpcTimeoutDuration(Duration.ofMillis(6000)) .setRpcTimeoutMultiplier(1) - .setInitialRpcTimeout(org.threeten.bp.Duration.parse(timeout.toString())) - .setInitialRetryDelay(org.threeten.bp.Duration.parse(backOffTime.toString())) + .setInitialRpcTimeoutDuration(Duration.ofMillis(6000)) + .setInitialRetryDelayDuration(Duration.ofMillis(10)) .setRetryDelayMultiplier(1) - .setMaxRetryDelay(org.threeten.bp.Duration.parse(backOffTime.toString())); + .setMaxRetryDelayDuration(Duration.ofMillis(10)); stubSettingsBuilder .bulkMutateRowsSettings()