Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adapt toString tests to introduction of java.time in gax #2274

Merged
merged 5 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/unmanaged_dependency_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .kokoro/presubmit/graalvm-native-17.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/presubmit/graalvm-native.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-bigtable-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>sdk-platform-java-config</artifactId>
<version>3.32.0</version>
<version>3.33.0</version>
<relativePath/>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions google-cloud-bigtable-deps-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>sdk-platform-java-config</artifactId>
<version>3.32.0</version>
<version>3.33.0</version>
<relativePath/>
</parent>

Expand Down Expand Up @@ -66,7 +66,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>gapic-libraries-bom</artifactId>
<version>1.40.0</version>
<version>1.41.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> nonStaticFields =
Arrays.stream(BigtableTableAdminStubSettings.class.getDeclaredFields())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -232,7 +231,7 @@ public void sendMessage(ReqT message) {
stubSettingsBuilder
.mutateRowSettings()
.retrySettings()
.setInitialRetryDelay(Duration.ofMillis(200));
.setInitialRetryDelayDuration(java.time.Duration.ofMillis(200));

stubSettingsBuilder
.bulkMutateRowsSettings()
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>sdk-platform-java-config</artifactId>
<version>3.32.0</version>
<version>3.33.0</version>
<relativePath/>
</parent>

Expand Down
Loading