@@ -152,11 +152,11 @@ public void endTimeTest() {
152
152
@ Test
153
153
public void heartbeatDurationTest () {
154
154
ReadChangeStreamQuery query =
155
- ReadChangeStreamQuery .create (TABLE_ID ).heartbeatDuration (java .time .Duration .ofSeconds (5 ));
155
+ ReadChangeStreamQuery .create (TABLE_ID )
156
+ .heartbeatDuration (org .threeten .bp .Duration .ofSeconds (5 ));
156
157
157
158
Builder expectedProto =
158
- expectedProtoBuilder ()
159
- .setHeartbeatDuration (com .google .protobuf .Duration .newBuilder ().setSeconds (5 ).build ());
159
+ expectedProtoBuilder ().setHeartbeatDuration (Duration .newBuilder ().setSeconds (5 ).build ());
160
160
161
161
ReadChangeStreamRequest actualProto = query .toProto (requestContext );
162
162
assertThat (actualProto ).isEqualTo (expectedProto .build ());
@@ -232,7 +232,7 @@ public void serializationTest() throws IOException, ClassNotFoundException {
232
232
.streamPartition ("simple-begin" , "simple-end" )
233
233
.continuationTokens (Collections .singletonList (token ))
234
234
.endTime (FAKE_END_TIME )
235
- .heartbeatDuration (java . time .Duration .ofSeconds (5 ));
235
+ .heartbeatDuration (org . threeten . bp .Duration .ofSeconds (5 ));
236
236
237
237
ByteArrayOutputStream bos = new ByteArrayOutputStream ();
238
238
ObjectOutputStream oos = new ObjectOutputStream (bos );
@@ -302,7 +302,7 @@ public void testEquality() {
302
302
.streamPartition ("simple-begin" , "simple-end" )
303
303
.startTime (FAKE_START_TIME )
304
304
.endTime (FAKE_END_TIME )
305
- .heartbeatDuration (java . time .Duration .ofSeconds (5 ));
305
+ .heartbeatDuration (org . threeten . bp .Duration .ofSeconds (5 ));
306
306
307
307
// ReadChangeStreamQuery#toProto should not change the ReadChangeStreamQuery instance state
308
308
request .toProto (requestContext );
@@ -312,7 +312,7 @@ public void testEquality() {
312
312
.streamPartition ("simple-begin" , "simple-end" )
313
313
.startTime (FAKE_START_TIME )
314
314
.endTime (FAKE_END_TIME )
315
- .heartbeatDuration (java . time .Duration .ofSeconds (5 )));
315
+ .heartbeatDuration (org . threeten . bp .Duration .ofSeconds (5 )));
316
316
317
317
assertThat (ReadChangeStreamQuery .create (TABLE_ID ).streamPartition ("begin-1" , "end-1" ))
318
318
.isNotEqualTo (ReadChangeStreamQuery .create (TABLE_ID ).streamPartition ("begin-2" , "end-1" ));
@@ -324,10 +324,10 @@ public void testEquality() {
324
324
ReadChangeStreamQuery .create (TABLE_ID ).endTime (Instant .ofEpochSecond (1L , 1001L )));
325
325
assertThat (
326
326
ReadChangeStreamQuery .create (TABLE_ID )
327
- .heartbeatDuration (java . time .Duration .ofSeconds (5 )))
327
+ .heartbeatDuration (org . threeten . bp .Duration .ofSeconds (5 )))
328
328
.isNotEqualTo (
329
329
ReadChangeStreamQuery .create (TABLE_ID )
330
- .heartbeatDuration (java . time .Duration .ofSeconds (6 )));
330
+ .heartbeatDuration (org . threeten . bp .Duration .ofSeconds (6 )));
331
331
}
332
332
333
333
@ Test
@@ -350,7 +350,7 @@ public void testClone() {
350
350
.streamPartition ("begin" , "end" )
351
351
.continuationTokens (Collections .singletonList (token ))
352
352
.endTime (FAKE_END_TIME )
353
- .heartbeatDuration (java . time .Duration .ofSeconds (5 ));
353
+ .heartbeatDuration (org . threeten . bp .Duration .ofSeconds (5 ));
354
354
ReadChangeStreamRequest request =
355
355
ReadChangeStreamRequest .newBuilder ()
356
356
.setTableName (NameUtil .formatTableName (PROJECT_ID , INSTANCE_ID , TABLE_ID ))
0 commit comments