Skip to content

Commit c5ad7a1

Browse files
authored
---
yaml --- r: 35553 b: refs/heads/autosynth-iamcredentials c: e5e7a21 h: refs/heads/master i: 35551: d30cde8
1 parent c9f8e21 commit c5ad7a1

5 files changed

Lines changed: 11 additions & 7 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ refs/heads/pubsub-ordering-keys: 3ea3dc93288c90e1776339a2c059a076e2e2fd1d
159159
refs/tags/v0.75.0: c3673089ae09a897c1b4cf7dfe167fe4f8ab32fb
160160
refs/tags/v0.76.0: 395b016826d3ddf9cb8b34919636df15a4dbd032
161161
refs/tags/v0.77.0: 28a85a77883ccf5d48f297fd0ef3b3dca6ce01f0
162-
refs/heads/autosynth-iamcredentials: 3c8c8d6104f8b914a7899fbd3258bd7534932664
162+
refs/heads/autosynth-iamcredentials: e5e7a21bdc829ae207af71388e1a37fe286f2cc1
163163
refs/heads/release-google-cloud-java-v0.78.0: fae5e980779cf0173a152636b278015b9f60ee55
164164
refs/tags/v0.78.0: 62d4bd30605ab3578f9a08d84487fb0b33ac2ff5
165165
refs/tags/v0.79.0: 82287b570708748c411d05c40f3932cff9606feb

branches/autosynth-iamcredentials/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/MessageDispatcher.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,7 @@ public void run() {
376376
/** Compute the ideal deadline, set subsequent modacks to this deadline, and return it. */
377377
@InternalApi
378378
int computeDeadlineSeconds() {
379-
long secLong = ackLatencyDistribution.getNthPercentile(PERCENTILE_FOR_ACK_DEADLINE_UPDATES);
380-
int sec = Ints.saturatedCast(secLong);
379+
int sec = ackLatencyDistribution.getPercentile(PERCENTILE_FOR_ACK_DEADLINE_UPDATES);
381380

382381
// Use Ints.constrainToRange when we get guava 21.
383382
if (sec < Subscriber.MIN_ACK_DEADLINE_SECONDS) {

branches/autosynth-iamcredentials/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package com.google.cloud.pubsub.v1;
1818

19+
import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
20+
1921
import com.google.api.core.ApiFunction;
2022
import com.google.api.core.ApiFuture;
2123
import com.google.api.core.ApiFutureCallback;
@@ -357,7 +359,8 @@ public void onFailure(Throwable t) {
357359
messagesWaiter.incrementPendingMessages(-outstandingBatch.size());
358360
}
359361
}
360-
});
362+
},
363+
directExecutor());
361364
}
362365

363366
private static final class OutstandingBatch {

branches/autosynth-iamcredentials/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package com.google.cloud.pubsub.v1;
1818

19+
import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
20+
1921
import com.google.api.core.AbstractApiService;
2022
import com.google.api.core.ApiClock;
2123
import com.google.api.core.ApiFuture;
@@ -291,7 +293,7 @@ public void onFailure(Throwable t) {
291293
.addAllAckIds(idChunk)
292294
.setAckDeadlineSeconds(modack.deadlineExtensionSeconds)
293295
.build());
294-
ApiFutures.addCallback(future, loggingCallback);
296+
ApiFutures.addCallback(future, loggingCallback, directExecutor());
295297
}
296298
}
297299

@@ -303,7 +305,7 @@ public void onFailure(Throwable t) {
303305
.setSubscription(subscription)
304306
.addAllAckIds(idChunk)
305307
.build());
306-
ApiFutures.addCallback(future, loggingCallback);
308+
ApiFutures.addCallback(future, loggingCallback, directExecutor());
307309
}
308310
}
309311
}

branches/autosynth-iamcredentials/google-cloud-clients/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/it/ITPubSubTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
import java.util.concurrent.BlockingQueue;
4343
import java.util.concurrent.LinkedBlockingQueue;
4444
import java.util.concurrent.TimeUnit;
45-
import junit.framework.Assert;
4645
import org.junit.AfterClass;
46+
import org.junit.Assert;
4747
import org.junit.BeforeClass;
4848
import org.junit.Rule;
4949
import org.junit.Test;

0 commit comments

Comments
 (0)