lhotari commented on a change in pull request #9182:
URL: https://github.com/apache/pulsar/pull/9182#discussion_r555519499
##########
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:
@sijie yes, I agree that placing timeouts all over could clutter the
test code.
Do you happen to know if there's already a default timeout set for each
individual test method?
----------------------------------------------------------------
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]