You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/09/14 14:39:58 UTC

[GitHub] [pulsar] eolivelli commented on a change in pull request #12037: [Client] Support passing existing executor providers to the client

eolivelli commented on a change in pull request #12037:
URL: https://github.com/apache/pulsar/pull/12037#discussion_r708340209



##########
File path: pulsar-client/src/test/java/org/apache/pulsar/client/impl/PulsarClientImplTest.java
##########
@@ -217,4 +219,32 @@ public void testResourceCleanup() throws PulsarClientException {
             assertFalse(eventLoopGroup.isShutdown());
         }
     }
+
+    @Test
+    public void testInitializingWithExecutorProviders() throws PulsarClientException {
+        ClientConfigurationData conf = clientImpl.conf;
+        @Cleanup("shutdownNow")
+        ExecutorProvider executorProvider = new ExecutorProvider(2, "shared-executor");
+        @Cleanup
+        PulsarClientImpl client2 = PulsarClientImpl.builder().conf(conf)
+                .internalExecutorProvider(executorProvider)
+                .externalExecutorProvider(executorProvider)
+                .build();
+        @Cleanup
+        PulsarClientImpl client3 = PulsarClientImpl.builder().conf(conf)
+                .internalExecutorProvider(executorProvider)
+                .externalExecutorProvider(executorProvider)
+                .build();
+    }
+
+    @Test(expectedExceptions = IllegalStateException.class)

Review comment:
       we should add a more narrow verification of the assertion, IllegalStateException may be thrown for other reasons




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org