From 099a16c7bb6611c68954e95f22a391cf833e1e8f Mon Sep 17 00:00:00 2001 From: Mattie Fu Date: Mon, 7 Nov 2022 14:46:41 -0500 Subject: [PATCH] update --- .../com/google/cloud/bigtable/testproxy/CbtTestProxy.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java b/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java index 089668d2b9..5119eae41f 100644 --- a/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java +++ b/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java @@ -217,14 +217,12 @@ public synchronized void createClient( BigtableDataSettings.Builder settingsBuilder = BigtableDataSettings.newBuilder(); if (request.hasPerOperationTimeout()) { - com.google.protobuf.Duration timeoutFromReq = request.getPerOperationTimeout(); - Duration newTimeout = - Duration.ofSeconds(timeoutFromReq.getSeconds(), timeoutFromReq.getNanos()); + Duration newTimeout = Duration.ofMillis(Durations.toMillis(request.getPerOperationTimeout())); settingsBuilder = overrideTimeoutSetting(newTimeout, settingsBuilder); logger.info( String.format( "Total timeout is set to %s for all the methods", - Durations.toString(timeoutFromReq))); + Durations.toString(request.getPerOperationTimeout()))); } // Create and store CbtClient for later use