From 93f66a70371f8095fd5c001a977d71e5622be46d Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Tue, 6 Aug 2024 10:48:41 -0400 Subject: [PATCH] fix: adapt `toString` tests to introduction of java.time in gax (#2274) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: adapt `toString` tests to introduction of java.time in gax * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * deps: update shared dependencies --------- Co-authored-by: Owl Bot Co-authored-by: Mend Renovate Co-authored-by: Lawrence Qiu --- .github/workflows/unmanaged_dependency_check.yaml | 2 +- .kokoro/presubmit/graalvm-native-17.cfg | 2 +- .kokoro/presubmit/graalvm-native.cfg | 2 +- google-cloud-bigtable-bom/pom.xml | 2 +- google-cloud-bigtable-deps-bom/pom.xml | 4 ++-- .../bigtable/admin/v2/BigtableInstanceAdminSettingsTest.java | 2 +- .../bigtable/admin/v2/BigtableTableAdminSettingsTest.java | 4 ++-- .../data/v2/stub/metrics/BuiltinMetricsTracerTest.java | 5 ++--- pom.xml | 2 +- 9 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/unmanaged_dependency_check.yaml b/.github/workflows/unmanaged_dependency_check.yaml index 9794f51093..2460ddcf65 100644 --- a/.github/workflows/unmanaged_dependency_check.yaml +++ b/.github/workflows/unmanaged_dependency_check.yaml @@ -14,6 +14,6 @@ jobs: shell: bash run: .kokoro/build.sh - name: Unmanaged dependency check - uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.32.0 + uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.33.0 with: bom-path: google-cloud-bigtable-bom/pom.xml diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg index 1043b30044..51d786651a 100644 --- a/.kokoro/presubmit/graalvm-native-17.cfg +++ b/.kokoro/presubmit/graalvm-native-17.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.32.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.33.0" } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg index 07199e9067..79883ef1a5 100644 --- a/.kokoro/presubmit/graalvm-native.cfg +++ b/.kokoro/presubmit/graalvm-native.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.32.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.33.0" } env_vars: { diff --git a/google-cloud-bigtable-bom/pom.xml b/google-cloud-bigtable-bom/pom.xml index a88130904f..d487a24a6b 100644 --- a/google-cloud-bigtable-bom/pom.xml +++ b/google-cloud-bigtable-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud sdk-platform-java-config - 3.32.0 + 3.33.0 diff --git a/google-cloud-bigtable-deps-bom/pom.xml b/google-cloud-bigtable-deps-bom/pom.xml index 17bc9b0052..0cb37f90c3 100644 --- a/google-cloud-bigtable-deps-bom/pom.xml +++ b/google-cloud-bigtable-deps-bom/pom.xml @@ -7,7 +7,7 @@ com.google.cloud sdk-platform-java-config - 3.32.0 + 3.33.0 @@ -66,7 +66,7 @@ com.google.cloud gapic-libraries-bom - 1.40.0 + 1.41.0 pom import diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettingsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettingsTest.java index fd761ff915..7ac632f29b 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettingsTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminSettingsTest.java @@ -144,7 +144,7 @@ public void testToString() throws IOException { BigtableInstanceAdminSettings settings = builder.build(); checkToString(settings); assertThat(settings.toString()).contains("endpoint=example.com:1234"); - assertThat(settings.toString()).contains("totalTimeout=PT13H32M"); + assertThat(settings.toString()).contains("totalTimeoutDuration=PT13H32M"); } void checkToString(BigtableInstanceAdminSettings settings) { diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java index 457ad4c637..506f73700b 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java @@ -171,8 +171,8 @@ public void testToString() throws IOException { checkToString(settings); assertThat(defaultSettings.toString()).doesNotContain("endpoint=example.com:1234"); assertThat(settings.toString()).contains("endpoint=example.com:1234"); - assertThat(defaultSettings.toString()).doesNotContain("totalTimeout=PT13H32M"); - assertThat(settings.toString()).contains("totalTimeout=PT13H32M"); + assertThat(defaultSettings.toString()).doesNotContain("totalTimeoutDuration=PT13H32M"); + assertThat(settings.toString()).contains("totalTimeoutDuration=PT13H32M"); List nonStaticFields = Arrays.stream(BigtableTableAdminStubSettings.class.getDeclaredFields()) 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 e3304acdbf..d37a2562bf 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 @@ -113,7 +113,6 @@ import org.junit.runners.JUnit4; import org.mockito.junit.MockitoJUnit; import org.mockito.junit.MockitoRule; -import org.threeten.bp.Duration; @RunWith(JUnit4.class) public class BuiltinMetricsTracerTest { @@ -232,7 +231,7 @@ public void sendMessage(ReqT message) { stubSettingsBuilder .mutateRowSettings() .retrySettings() - .setInitialRetryDelay(Duration.ofMillis(200)); + .setInitialRetryDelayDuration(java.time.Duration.ofMillis(200)); stubSettingsBuilder .bulkMutateRowsSettings() @@ -242,7 +241,7 @@ public void sendMessage(ReqT message) { BatchingSettings.newBuilder() .setElementCountThreshold((long) batchElementCount) .setRequestByteThreshold(1000L) - .setDelayThreshold(Duration.ofHours(1)) + .setDelayThresholdDuration(java.time.Duration.ofHours(1)) .setFlowControlSettings( FlowControlSettings.newBuilder() .setMaxOutstandingElementCount((long) batchElementCount + 1) diff --git a/pom.xml b/pom.xml index 8b76ca9c87..57c414a07a 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud sdk-platform-java-config - 3.32.0 + 3.33.0