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 2018/09/17 08:00:21 UTC

[GitHub] ivankelly commented on a change in pull request #2585: [tests] Make BrokerClientIntegrationTest testing behavior deterministic

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

 ##########
 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:
   you could use producer.flush() here.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services