sijie commented on a change in pull request #2585: [tests] Make 
BrokerClientIntegrationTest testing behavior deterministic
URL: https://github.com/apache/incubator-pulsar/pull/2585#discussion_r218218701
 
 

 ##########
 File path: 
pulsar-broker/src/test/java/org/apache/pulsar/client/impl/BrokerClientIntegrationTest.java
 ##########
 @@ -333,12 +336,13 @@ public void 
testUnsupportedBatchMessageConsumer(SubscriptionType subType) throws
         // verification
         consumer1.setClientCnx(null);
         // (2) send batch-message which should not be able to consume: as 
broker will disconnect the consumer
-        for (int i = 0; i < 10; i++) {
+        CompletableFuture<MessageId> lastSendFuture = null;
+        for (int i = 0; i < numMessagesPerBatch; i++) {
             String message = "my-message-" + i;
-            batchProducer.sendAsync(message.getBytes());
+            lastSendFuture = batchProducer.sendAsync(message.getBytes());
         }
 
 Review comment:
   changed to use producer.flush

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to