diff --git a/google-cloud-pubsub/clirr-ignored-differences.xml b/google-cloud-pubsub/clirr-ignored-differences.xml
index fc73daacd..866962660 100644
--- a/google-cloud-pubsub/clirr-ignored-differences.xml
+++ b/google-cloud-pubsub/clirr-ignored-differences.xml
@@ -1,4 +1,18 @@
A zero duration effectively disables auto deadline extensions. */ - public Builder setMaxAckExtensionPeriod(Duration maxAckExtensionPeriod) { + public Builder setMaxAckExtensionPeriodDuration(java.time.Duration maxAckExtensionPeriod) { Preconditions.checkArgument(maxAckExtensionPeriod.toMillis() >= 0); this.maxAckExtensionPeriod = maxAckExtensionPeriod; return this; } + /** + * This method is obsolete. Use {@link + * #setMaxDurationPerAckExtensionDuration(java.time.Duration)} instead. + */ + @ObsoleteApi("Use setMaxDurationPerAckExtensionDuration(java.time.Duration) instead") + public Builder setMaxDurationPerAckExtension( + org.threeten.bp.Duration maxDurationPerAckExtension) { + return setMaxDurationPerAckExtensionDuration(toJavaTimeDuration(maxDurationPerAckExtension)); + } + /** * Set the upper bound for a single mod ack extention period. * @@ -621,7 +655,8 @@ public Builder setMaxAckExtensionPeriod(Duration maxAckExtensionPeriod) { * *
MaxDurationPerAckExtension configuration can be disabled by specifying a zero duration. */ - public Builder setMaxDurationPerAckExtension(Duration maxDurationPerAckExtension) { + public Builder setMaxDurationPerAckExtensionDuration( + java.time.Duration maxDurationPerAckExtension) { // If a non-default min is set, make sure min is less than max Preconditions.checkArgument( maxDurationPerAckExtension.toMillis() >= 0 @@ -633,6 +668,16 @@ public Builder setMaxDurationPerAckExtension(Duration maxDurationPerAckExtension return this; } + /** + * This method is obsolete. Use {@link + * #setMinDurationPerAckExtensionDuration(java.time.Duration)} instead. + */ + @ObsoleteApi("Use setMinDurationPerAckExtensionDuration(java.time.Duration) instead") + public Builder setMinDurationPerAckExtension( + org.threeten.bp.Duration minDurationPerAckExtension) { + return setMinDurationPerAckExtensionDuration(toJavaTimeDuration(minDurationPerAckExtension)); + } + /** * Set the lower bound for a single mod ack extention period. * @@ -643,7 +688,8 @@ public Builder setMaxDurationPerAckExtension(Duration maxDurationPerAckExtension * *
MinDurationPerAckExtension configuration can be disabled by specifying a zero duration. */ - public Builder setMinDurationPerAckExtension(Duration minDurationPerAckExtension) { + public Builder setMinDurationPerAckExtensionDuration( + java.time.Duration minDurationPerAckExtension) { // If a non-default max is set, make sure min is less than max Preconditions.checkArgument( minDurationPerAckExtension.toMillis() >= 0 diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakePublisherServiceImpl.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakePublisherServiceImpl.java index 23817f558..9ab1dec73 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakePublisherServiceImpl.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakePublisherServiceImpl.java @@ -21,13 +21,13 @@ import com.google.pubsub.v1.PublishResponse; import com.google.pubsub.v1.PublisherGrpc.PublisherImplBase; import io.grpc.stub.StreamObserver; +import java.time.Duration; import java.util.ArrayList; import java.util.List; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.threeten.bp.Duration; /** * A fake implementation of {@link PublisherImplBase}, that can be used to test clients of a Cloud diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeScheduledExecutorService.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeScheduledExecutorService.java index cf067e2da..65e199e92 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeScheduledExecutorService.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeScheduledExecutorService.java @@ -18,6 +18,8 @@ import com.google.common.primitives.Ints; import com.google.common.util.concurrent.SettableFuture; +import java.time.Duration; +import java.time.Instant; import java.util.ArrayList; import java.util.Deque; import java.util.LinkedList; @@ -32,8 +34,6 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; -import org.threeten.bp.Duration; -import org.threeten.bp.Instant; /** * Fake implementation of {@link ScheduledExecutorService} that allows tests control the reference diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java index c608ee8d5..bd3dccccf 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/MessageDispatcherTest.java @@ -26,13 +26,13 @@ import com.google.protobuf.ByteString; import com.google.pubsub.v1.PubsubMessage; import com.google.pubsub.v1.ReceivedMessage; +import java.time.Duration; import java.util.*; import java.util.concurrent.*; import org.junit.Before; import org.junit.Test; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -import org.threeten.bp.Duration; public class MessageDispatcherTest { private static final ByteString MESSAGE_DATA = ByteString.copyFromUtf8("message-data"); diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java index 411b61d15..cdefa84f7 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/PublisherImplTest.java @@ -54,6 +54,7 @@ import io.opentelemetry.sdk.testing.assertj.SpanDataAssert; import io.opentelemetry.sdk.testing.junit4.OpenTelemetryRule; import io.opentelemetry.sdk.trace.data.SpanData; +import java.time.Duration; import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; @@ -66,7 +67,6 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import org.threeten.bp.Duration; @RunWith(JUnit4.class) public class PublisherImplTest { @@ -120,7 +120,7 @@ public void testPublishByDuration() throws Exception { .setBatchingSettings( Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .setElementCountThreshold(10L) .build()) .build(); @@ -151,7 +151,7 @@ public void testPublishByNumBatchedMessages() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(2L) - .setDelayThreshold(Duration.ofSeconds(100)) + .setDelayThresholdDuration(Duration.ofSeconds(100)) .build()) .build(); @@ -190,7 +190,7 @@ public void testSinglePublishByNumBytes() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(2L) - .setDelayThreshold(Duration.ofSeconds(100)) + .setDelayThresholdDuration(Duration.ofSeconds(100)) .build()) .build(); @@ -225,7 +225,7 @@ public void testPublishByShutdown() throws Exception { .setBatchingSettings( Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() - .setDelayThreshold(Duration.ofSeconds(100)) + .setDelayThresholdDuration(Duration.ofSeconds(100)) .setElementCountThreshold(10L) .build()) .build(); @@ -259,7 +259,7 @@ public void testPublishMixedSizeAndDuration() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(2L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .build()) .build(); @@ -300,7 +300,7 @@ public void testPublishWithCompression() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(2L) - .setDelayThreshold(Duration.ofSeconds(100)) + .setDelayThresholdDuration(Duration.ofSeconds(100)) .build()) .setEnableCompression(true) .setCompressionBytesThreshold(100) @@ -331,7 +331,7 @@ public void testBatchedMessagesWithOrderingKeyByNum() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(3L) - .setDelayThreshold(Duration.ofSeconds(100)) + .setDelayThresholdDuration(Duration.ofSeconds(100)) .build()) .setEnableMessageOrdering(true) .build(); @@ -384,7 +384,7 @@ public void testBatchedMessagesWithOrderingKeyByDuration() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(10L) - .setDelayThreshold(Duration.ofSeconds(100)) + .setDelayThresholdDuration(Duration.ofSeconds(100)) .build()) .setEnableMessageOrdering(true) .build(); @@ -448,7 +448,7 @@ public void testLargeMessagesDoNotReorderBatches() throws Exception { .toBuilder() .setElementCountThreshold(10L) .setRequestByteThreshold(64L) - .setDelayThreshold(Duration.ofSeconds(100)) + .setDelayThresholdDuration(Duration.ofSeconds(100)) .build()) .setEnableMessageOrdering(true) .build(); @@ -490,7 +490,7 @@ public void testEnableMessageOrdering_overwritesMaxAttempts() throws Exception { .setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setTotalTimeout(Duration.ofSeconds(10)) + .setTotalTimeoutDuration(Duration.ofSeconds(10)) .setMaxAttempts(1) .build()) .setEnableMessageOrdering(true) @@ -613,7 +613,7 @@ public void testPublishThrowExceptionForUnsubmittedOrderingKeyMessage() throws E Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(2L) - .setDelayThreshold(Duration.ofSeconds(500)) + .setDelayThresholdDuration(Duration.ofSeconds(500)) .build()) .setEnableMessageOrdering(true) .build(); @@ -674,7 +674,7 @@ public void testErrorPropagation() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .build()) .build(); testPublisherServiceImpl.addPublishError(Status.DATA_LOSS.asException()); @@ -695,7 +695,7 @@ public void testPublishFailureRetries() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .build()) .build(); // To demonstrate that reaching duration will trigger publish @@ -718,7 +718,7 @@ public void testPublishFailureRetries_retriesDisabled() throws Exception { .setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setTotalTimeout(Duration.ofSeconds(10)) + .setTotalTimeoutDuration(Duration.ofSeconds(10)) .setMaxAttempts(1) .build()) .build(); @@ -743,7 +743,7 @@ public void testPublishFailureRetries_maxRetriesSetup() throws Exception { .setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setTotalTimeout(Duration.ofSeconds(10)) + .setTotalTimeoutDuration(Duration.ofSeconds(10)) .setMaxAttempts(3) .build()) .build(); @@ -768,7 +768,7 @@ public void testPublishFailureRetries_maxRetriesSetUnlimited() throws Exception .setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setTotalTimeout(Duration.ofSeconds(10)) + .setTotalTimeoutDuration(Duration.ofSeconds(10)) .setMaxAttempts(0) .build()) .build(); @@ -794,13 +794,13 @@ public void testPublishFailureRetries_nonRetryableFailsImmediately() throws Exce .setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setTotalTimeout(Duration.ofSeconds(10)) + .setTotalTimeoutDuration(Duration.ofSeconds(10)) .build()) .setBatchingSettings( Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .build()) .build(); // To demonstrate that reaching duration will trigger publish @@ -825,7 +825,7 @@ public void testPublisherGetters() throws Exception { builder.setBatchingSettings( BatchingSettings.newBuilder() .setRequestByteThreshold(10L) - .setDelayThreshold(Duration.ofMillis(11)) + .setDelayThresholdDuration(Duration.ofMillis(11)) .setElementCountThreshold(12L) .build()); builder.setCredentialsProvider(NoCredentialsProvider.create()); @@ -833,7 +833,8 @@ public void testPublisherGetters() throws Exception { assertEquals(TEST_TOPIC, publisher.getTopicName()); assertEquals(10, (long) publisher.getBatchingSettings().getRequestByteThreshold()); - assertEquals(Duration.ofMillis(11), publisher.getBatchingSettings().getDelayThreshold()); + assertEquals( + Duration.ofMillis(11), publisher.getBatchingSettings().getDelayThresholdDuration()); assertEquals(12, (long) publisher.getBatchingSettings().getElementCountThreshold()); publisher.shutdown(); assertTrue(publisher.awaitTermination(1, TimeUnit.MINUTES)); @@ -848,7 +849,8 @@ public void testBuilderParametersAndDefaults() { Publisher.Builder.DEFAULT_REQUEST_BYTES_THRESHOLD, builder.batchingSettings.getRequestByteThreshold().longValue()); assertEquals( - Publisher.Builder.DEFAULT_DELAY_THRESHOLD, builder.batchingSettings.getDelayThreshold()); + Publisher.Builder.DEFAULT_DELAY_THRESHOLD, + builder.batchingSettings.getDelayThresholdDuration()); assertEquals( Publisher.Builder.DEFAULT_ELEMENT_COUNT_THRESHOLD, builder.batchingSettings.getElementCountThreshold().longValue()); @@ -906,7 +908,7 @@ public void testBuilderInvalidArguments() { builder.setBatchingSettings( Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() - .setDelayThreshold(Duration.ofMillis(1)) + .setDelayThresholdDuration(Duration.ofMillis(1)) .build()); try { builder.setBatchingSettings( @@ -919,7 +921,7 @@ public void testBuilderInvalidArguments() { builder.setBatchingSettings( Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() - .setDelayThreshold(Duration.ofMillis(-1)) + .setDelayThresholdDuration(Duration.ofMillis(-1)) .build()); fail("Should have thrown an IllegalArgumentException"); } catch (IllegalArgumentException expected) { @@ -965,13 +967,13 @@ public void testBuilderInvalidArguments() { builder.setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setInitialRpcTimeout(Publisher.Builder.MIN_RPC_TIMEOUT) + .setInitialRpcTimeoutDuration(Publisher.Builder.MIN_RPC_TIMEOUT) .build()); try { builder.setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setInitialRpcTimeout(Publisher.Builder.MIN_RPC_TIMEOUT.minusMillis(1)) + .setInitialRpcTimeoutDuration(Publisher.Builder.MIN_RPC_TIMEOUT.minusMillis(1)) .build()); fail("Should have thrown an IllegalArgumentException"); } catch (IllegalArgumentException expected) { @@ -980,13 +982,13 @@ public void testBuilderInvalidArguments() { builder.setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setTotalTimeout(Publisher.Builder.MIN_TOTAL_TIMEOUT) + .setTotalTimeoutDuration(Publisher.Builder.MIN_TOTAL_TIMEOUT) .build()); try { builder.setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setTotalTimeout(Publisher.Builder.MIN_TOTAL_TIMEOUT.minusMillis(1)) + .setTotalTimeoutDuration(Publisher.Builder.MIN_TOTAL_TIMEOUT.minusMillis(1)) .build()); fail("Should have thrown an IllegalArgumentException"); } catch (IllegalArgumentException expected) { @@ -1031,7 +1033,7 @@ public void testAwaitTermination() throws Exception { .setRetrySettings( Publisher.Builder.DEFAULT_RETRY_SETTINGS .toBuilder() - .setTotalTimeout(Duration.ofSeconds(10)) + .setTotalTimeoutDuration(Duration.ofSeconds(10)) .setMaxAttempts(0) .build()) .build(); @@ -1066,7 +1068,7 @@ public void invalidFlowControlBytes_throwException() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( FlowControlSettings.newBuilder() .setLimitExceededBehavior( @@ -1091,7 +1093,7 @@ public void invalidFlowControlElementCount_throwException() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( FlowControlSettings.newBuilder() .setLimitExceededBehavior( @@ -1116,7 +1118,7 @@ public void testMessageExceedsFlowControlLimits_throwException() throws Exceptio Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( FlowControlSettings.newBuilder() .setLimitExceededBehavior(FlowController.LimitExceededBehavior.Block) @@ -1144,7 +1146,7 @@ public void testPublishFlowControl_throwException() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( FlowControlSettings.newBuilder() .setLimitExceededBehavior( @@ -1186,7 +1188,7 @@ public void testPublishFlowControl_throwExceptionWithOrderingKey() throws Except Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( FlowControlSettings.newBuilder() .setLimitExceededBehavior( @@ -1233,7 +1235,7 @@ public void testPublishFlowControl_block() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( FlowControlSettings.newBuilder() .setLimitExceededBehavior(FlowController.LimitExceededBehavior.Block) @@ -1325,7 +1327,7 @@ public void testPublishOpenTelemetryTracing() throws Exception { Publisher.Builder.DEFAULT_BATCHING_SETTINGS .toBuilder() .setElementCountThreshold(1L) - .setDelayThreshold(Duration.ofSeconds(5)) + .setDelayThresholdDuration(Duration.ofSeconds(5)) .setFlowControlSettings( FlowControlSettings.newBuilder() .setLimitExceededBehavior(FlowController.LimitExceededBehavior.Block) diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnectionTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnectionTest.java index 95f8897a4..412dd2ad8 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnectionTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnectionTest.java @@ -34,6 +34,7 @@ import com.google.rpc.Status; import io.grpc.StatusException; import io.grpc.protobuf.StatusProto; +import java.time.Duration; import java.util.*; import java.util.concurrent.ExecutionException; import org.junit.After; @@ -41,7 +42,6 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestName; -import org.threeten.bp.Duration; /** Tests for {@link StreamingSubscriberConnection}. */ public class StreamingSubscriberConnectionTest { diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java index 612c244fe..679d37e40 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java @@ -35,13 +35,13 @@ import io.grpc.StatusException; import io.grpc.inprocess.InProcessChannelBuilder; import io.grpc.inprocess.InProcessServerBuilder; +import java.time.Duration; import java.util.concurrent.*; import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestName; -import org.threeten.bp.Duration; /** Tests for {@link Subscriber}. */ public class SubscriberTest { @@ -241,7 +241,8 @@ public void testStreamAckDeadlineIsSetCorrectly() throws Exception { Subscriber subscriber = startSubscriber( getTestSubscriberBuilder(testReceiver) - .setMaxDurationPerAckExtension(Duration.ofSeconds(maxDurationPerAckExtension))); + .setMaxDurationPerAckExtensionDuration( + Duration.ofSeconds(maxDurationPerAckExtension))); assertEquals( expectedChannelCount, fakeSubscriberServiceImpl.waitForOpenedStreams(expectedChannelCount)); assertEquals( @@ -255,7 +256,8 @@ public void testStreamAckDeadlineIsSetCorrectly() throws Exception { subscriber = startSubscriber( getTestSubscriberBuilder(testReceiver) - .setMaxDurationPerAckExtension(Duration.ofSeconds(maxDurationPerAckExtension))); + .setMaxDurationPerAckExtensionDuration( + Duration.ofSeconds(maxDurationPerAckExtension))); assertEquals( expectedChannelCount, fakeSubscriberServiceImpl.waitForOpenedStreams(expectedChannelCount)); assertEquals( @@ -269,7 +271,8 @@ public void testStreamAckDeadlineIsSetCorrectly() throws Exception { subscriber = startSubscriber( getTestSubscriberBuilder(testReceiver) - .setMaxDurationPerAckExtension(Duration.ofSeconds(maxDurationPerAckExtension))); + .setMaxDurationPerAckExtensionDuration( + Duration.ofSeconds(maxDurationPerAckExtension))); assertEquals( expectedChannelCount, fakeSubscriberServiceImpl.waitForOpenedStreams(expectedChannelCount)); assertEquals(