sijie commented on a change in pull request #9182:
URL: https://github.com/apache/pulsar/pull/9182#discussion_r555550495



##########
File path: 
pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
##########
@@ -3692,4 +3693,88 @@ public void testGetStatsForPartitionedTopic() throws 
Exception {
         consumer.close();
         producer.close();
     }
+
+    @Test
+    public void testIncomingMessageSizeForNonPartitionedTopic() throws 
Exception {
+        final String topicName = 
"persistent://my-property/my-ns/testIncomingMessageSizeForNonPartitionedTopic-" 
+
+                UUID.randomUUID().toString();
+        final String subName = "my-sub";
+
+        @Cleanup
+        Consumer<byte[]> consumer = pulsarClient.newConsumer()
+                .topic(topicName)
+                .subscriptionName(subName)
+                .subscribe();
+
+        @Cleanup
+        Producer<byte[]> producer = pulsarClient.newProducer()
+                .topic(topicName)
+                .create();
+
+        final int messages = 100;
+        List<CompletableFuture<MessageId>> messageIds = new 
ArrayList<>(messages);
+        for (int i = 0; i < messages; i++) {
+            messageIds.add(producer.newMessage().value(("Message-" + 
i).getBytes()).sendAsync());
+        }
+        FutureUtil.waitForAll(messageIds).get();

Review comment:
       Yes. The TestNG has global timeout settings.




----------------------------------------------------------------
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]


Reply via email to