Skip to content

Commit aae20c9

Browse files
committed
Fixed java.time.duration merging conflicts
1 parent 3b2f203 commit aae20c9

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

google-cloud-datastore/src/test/java/com/google/cloud/datastore/DatastoreTestGrpc.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
import com.google.cloud.grpc.GrpcTransportOptions;
2121
import com.google.common.truth.Truth;
2222
import java.io.IOException;
23+
import java.time.Duration;
2324
import java.util.Arrays;
2425
import org.junit.AfterClass;
2526
import org.junit.BeforeClass;
2627
import org.junit.runner.RunWith;
2728
import org.junit.runners.Parameterized;
28-
import org.threeten.bp.Duration;
2929

3030
@RunWith(Parameterized.class)
3131
public class DatastoreTestGrpc extends AbstractDatastoreTest {
@@ -56,6 +56,6 @@ public static void beforeClass() throws IOException, InterruptedException {
5656
public static void afterClass() throws Exception {
5757
datastore.close();
5858
Truth.assertThat(datastore.isClosed()).isTrue();
59-
helper.stop(Duration.ofMinutes(1));
59+
helper.stopDuration(Duration.ofMinutes(1));
6060
}
6161
}

google-cloud-datastore/src/test/java/com/google/cloud/datastore/DatastoreTestHttp.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
import com.google.cloud.datastore.testing.LocalDatastoreHelper;
2020
import com.google.cloud.grpc.GrpcTransportOptions;
2121
import java.io.IOException;
22+
import java.time.Duration;
2223
import java.util.Arrays;
2324
import org.junit.AfterClass;
2425
import org.junit.BeforeClass;
2526
import org.junit.runner.RunWith;
2627
import org.junit.runners.Parameterized;
27-
import org.threeten.bp.Duration;
2828

2929
@RunWith(Parameterized.class)
3030
public class DatastoreTestHttp extends AbstractDatastoreTest {
@@ -52,6 +52,6 @@ public static void beforeClass() throws IOException, InterruptedException {
5252

5353
@AfterClass
5454
public static void afterClass() throws Exception {
55-
helper.stop(Duration.ofMinutes(1));
55+
helper.stopDuration(Duration.ofMinutes(1));
5656
}
5757
}

google-cloud-datastore/src/test/java/com/google/cloud/datastore/it/AbstractITDatastoreTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
import com.google.common.truth.Truth;
8686
import com.google.datastore.v1.TransactionOptions;
8787
import com.google.datastore.v1.TransactionOptions.ReadOnly;
88+
import java.time.Duration;
8889
import java.util.ArrayList;
8990
import java.util.Collections;
9091
import java.util.HashSet;
@@ -105,7 +106,6 @@
105106
import org.junit.rules.Timeout;
106107
import org.junit.runner.RunWith;
107108
import org.junit.runners.Parameterized;
108-
import org.threeten.bp.Duration;
109109

110110
@RunWith(Parameterized.class)
111111
public abstract class AbstractITDatastoreTest {
@@ -649,7 +649,7 @@ private void assertExecutionStats(
649649
Truth.assertThat(debugStats.get("index_entries_scanned"))
650650
.isEqualTo(expectedIndexEntriesScanned);
651651

652-
Duration executionDuration = executionStats.getExecutionDuration();
652+
Duration executionDuration = executionStats.getExecutionDurationJavaTime();
653653
Truth.assertThat(executionDuration).isIn(Range.greaterThan(Duration.ofMillis(0)));
654654

655655
long readOperations = executionStats.getReadOperations();

google-cloud-datastore/src/test/java/com/google/cloud/datastore/spi/v1/RpcUtilsTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import com.google.api.gax.rpc.UnaryCallSettings;
2323
import com.google.cloud.datastore.DatastoreOptions;
2424
import org.junit.Test;
25-
import org.threeten.bp.Duration;
25+
import java.time.Duration;
2626

2727
public class RpcUtilsTest {
2828

@@ -40,9 +40,9 @@ public void testRetrySettingSetter() {
4040
// datastoreOptions with custom retry settings
4141
RetrySettings customRetrySettings =
4242
RetrySettings.newBuilder()
43-
.setTotalTimeout(Duration.ofMinutes(2))
44-
.setInitialRpcTimeout(Duration.ofSeconds(5))
45-
.setMaxRpcTimeout(Duration.ofSeconds(10))
43+
.setTotalTimeoutDuraion(Duration.ofMinutes(2))
44+
.setInitialRpcTimeoutDuraion(Duration.ofSeconds(5))
45+
.setMaxRpcTimeoutDuraion(Duration.ofSeconds(10))
4646
.setRetryDelayMultiplier(1.5)
4747
.setMaxAttempts(5)
4848
.build();

google-cloud-datastore/src/test/java/com/google/cloud/datastore/testing/RemoteDatastoreHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
import com.google.cloud.grpc.GrpcTransportOptions;
3030
import com.google.cloud.http.HttpTransportOptions;
3131
import io.opentelemetry.sdk.OpenTelemetrySdk;
32+
import java.time.Duration;
3233
import java.util.UUID;
3334
import javax.annotation.Nullable;
34-
import org.threeten.bp.Duration;
3535

3636
/**
3737
* Utility to create a remote datastore configuration for testing. Datastore options can be obtained

0 commit comments

Comments
 (0)