diff --git a/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java b/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java index 0a90e5bdcd5f..22865dc427d2 100644 --- a/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java +++ b/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java @@ -189,6 +189,9 @@ public void testPartitionedDmlDoesNotTimeout() throws Exception { DatabaseClient client = spanner.getDatabaseClient(DatabaseId.of("[PROJECT]", "[INSTANCE]", "[DATABASE]")); + assertThat( + spanner.getOptions().getPartitionedDmlTimeout(), is(equalTo(Duration.ofHours(2L)))); + // PDML should not timeout with these settings. long updateCount = client.executePartitionedUpdate(UPDATE_STATEMENT); assertThat(updateCount, is(equalTo(UPDATE_COUNT))); @@ -228,6 +231,9 @@ public void testPartitionedDmlWithTimeout() throws Exception { DatabaseClient client = spanner.getDatabaseClient(DatabaseId.of("[PROJECT]", "[INSTANCE]", "[DATABASE]")); + assertThat( + spanner.getOptions().getPartitionedDmlTimeout(), is(equalTo(Duration.ofMillis(1L)))); + // PDML should timeout with these settings. try { client.executePartitionedUpdate(UPDATE_STATEMENT);