sijie commented on a change in pull request #5603: Add retry when create 
producer async
URL: https://github.com/apache/pulsar/pull/5603#discussion_r344676331
 
 

 ##########
 File path: 
pulsar-broker/src/test/java/org/apache/pulsar/stats/client/PulsarBrokerStatsClientTest.java
 ##########
 @@ -132,5 +135,61 @@ public void testTopicInternalStats() throws Exception {
         log.info("-- Exiting {} test --", methodName);
     }
 
+    @Test
+    public void testGetPartitionedTopicMetaData() throws Exception {
+        log.info("-- Starting {} test --", methodName);
+
+        final String topicName = "persistent://my-property/my-ns/my-topic1";
+        final String subscriptionName = "my-subscriber-name";
+
+
+
+        try {
+            String url = "http://localhost:51000,localhost:"; + 
BROKER_WEBSERVICE_PORT;
+            if (isTcpLookup) {
+                url = "pulsar://localhost:51000,localhost:" + BROKER_PORT;
+            }
+            PulsarClient client = newPulsarClient(url, 0);
+
+            Consumer<byte[]> consumer = 
client.newConsumer().topic(topicName).subscriptionName(subscriptionName)
+                    .acknowledgmentGroupTime(0, TimeUnit.SECONDS).subscribe();
+            Producer<byte[]> producer = 
client.newProducer().topic(topicName).create();
+
+            consumer.close();
+            producer.close();
+            client.close();
+        } catch (PulsarClientException pce) {
+            log.error("create producer or consumer error: ", pce);
+            fail();
+        }
+
+        try {
+
+            String url = "http://localhost:51000,localhost:51001";;
+            if (isTcpLookup) {
+                url = "pulsar://localhost:51000,localhost:51001";
+            }
+//            PulsarClient client = newPulsarClient(url, 0);
 
 Review comment:
   remove it if the code is not needed any more.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to