File tree Expand file tree Collapse file tree
branches/tswast-patch-1/google-cloud-pubsub/src
main/java/com/google/cloud/pubsub/spi/v1
test/java/com/google/cloud/pubsub/spi/v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60- refs/heads/tswast-patch-1: c4c80f54f707f4bce8debf17dd9fd475628e42f1
60+ refs/heads/tswast-patch-1: 65d5aad677ebcfeb81165b02051a44244c44e576
6161refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b
Original file line number Diff line number Diff line change @@ -335,9 +335,10 @@ private void startConnections(
335335 List <? extends ApiService > connections , final ApiService .Listener connectionsListener ) {
336336 for (ApiService subscriber : connections ) {
337337 subscriber .addListener (connectionsListener , executor );
338- // Starting each connection submits a blocking task to the executor.
339- // We start connections one at a time to avoid swamping executor with blocking tasks.
340- subscriber .startAsync ().awaitRunning ();
338+ subscriber .startAsync ();
339+ }
340+ for (ApiService subscriber : connections ) {
341+ subscriber .awaitRunning ();
341342 }
342343 }
343344
@@ -468,10 +469,10 @@ public Builder setCredentialsProvider(CredentialsProvider credentialsProvider) {
468469 }
469470
470471 /**
471- * Gives the ability to set a custom executor for managing lease extensions. If none is provided
472- * a shared one will be used by all {@link Subscriber} instances.
472+ * Gives the ability to set a custom executor for polling and managing lease extensions. If none
473+ * is provided a shared one will be used by all {@link Subscriber} instances.
473474 */
474- public Builder setLeaseAlarmsExecutorProvider (ExecutorProvider executorProvider ) {
475+ public Builder setSystemExecutorProvider (ExecutorProvider executorProvider ) {
475476 this .systemExecutorProvider = Preconditions .checkNotNull (executorProvider );
476477 return this ;
477478 }
Original file line number Diff line number Diff line change @@ -536,7 +536,7 @@ private void sendMessages(Iterable<String> ackIds) throws InterruptedException {
536536 private Builder getTestSubscriberBuilder (MessageReceiver receiver ) {
537537 return Subscriber .defaultBuilder (TEST_SUBSCRIPTION , receiver )
538538 .setExecutorProvider (FixedExecutorProvider .create (fakeExecutor ))
539- .setLeaseAlarmsExecutorProvider (FixedExecutorProvider .create (fakeExecutor ))
539+ .setSystemExecutorProvider (FixedExecutorProvider .create (fakeExecutor ))
540540 .setChannelProvider (FixedChannelProvider .create (testChannel ))
541541 .setCredentialsProvider (PublisherImplTest .NO_CREDENTIALS_PROVIDER )
542542 .setClock (fakeExecutor .getClock ());
You can’t perform that action at this time.
0 commit comments